Transform SIGNUM for double-floats

Bug #1903533 reported by Michał "phoe" Herda
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Douglas Katzman

Bug Description

I request an implementation of SIGNUM specialized for double-floats.

Simplified example of current behavior (SBCL 2.0.10 on Linux amd64):

(defun foo (qx)
  (declare (optimize speed)
           (double-float qx))
  (signum (* qx qx)))

; file: /tmp/slime7JzwHT
; in: DEFUN FOO
; (SIGNUM (* QX QX))
;
; note: doing float to pointer coercion (cost 13)
;
; compilation unit finished
; printed 1 note

(A non-simplified example processes the result of SIGNUM further, so it's not a matter of boxing it again as a return value.)

Krystof on #sbcl mentioned that a wishlist ticket for a SIGNUM transform would be okay, so here it is.

Revision history for this message
Douglas Katzman (dougk) wrote :
Changed in sbcl:
assignee: nobody → Douglas Katzman (dougk)
status: New → Fix Committed
Revision history for this message
Michał "phoe" Herda (phoe-krk) wrote :

Thanks!

Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.