Opened 12 years ago

Closed 11 years ago

#458 closed defect (fixed)

decode-float and negative arguments

Reported by: rme Owned by: rme
Priority: normal Milestone:
Component: ANSI CL Compliance Version: trunk
Keywords: Cc:


According to the spec, the following should be true for any floating-point number f:

 (multiple-value-bind (signif expon sign)
                      (decode-float f)
   (* (scale-float signif expon) sign))
==  f

If f is negative, we appear to leave an extra minus sign in the results:

CCL> (decode-float -1.0d0)

and thus:

CCL> (let ((f -1.0d0))
       (multiple-value-bind (signif expon sign)
	   (decode-float f)
	 (* (scale-float signif expon) sign)))


Probably we should ensure that the significand is non-negative in all cases.

Change History (2)

comment:1 Changed 11 years ago by rme

  • Owner changed from gb to rme
  • Status changed from new to assigned

comment:2 Changed 11 years ago by rme

  • Resolution set to fixed
  • Status changed from assigned to closed

r12418 tries to address this.

Note: See TracTickets for help on using tickets.