Opened 14 years ago

Closed 12 years ago

#272 closed defect (invalid)

(coerce (/ pi 2) 'single-float) incorrect

Reported by: gz Owned by: gb
Priority: minor Milestone:
Component: ANSI CL Compliance Version:
Keywords: Cc:


? (/ pi 2)
? (coerce * 'single-float)

Change History (1)

comment:1 Changed 12 years ago by rme

  • Resolution set to invalid
  • Status changed from new to closed

I don't think this is a bug. It seems to be a consequence of the binary floating point representation.

Looking at the (scaled) significands, we see:

CCL> (format t "~b" (integer-decode-float (/ pi 2)))
CCL> (format t "~b" (integer-decode-float (coerce (/ pi 2) 'single-float)))

which seems correct to me.

Note: See TracTickets for help on using tickets.