Opened 17 years ago
Closed 17 years ago
#10 closed defect (fixed)
round is sometimes wrong for numbers bigger than most-positive-fixnum
Reported by: | Raymond Toy | Owned by: | somebody |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | 19d |
Keywords: | round | Cc: |
Description
(round (+ 536870911 1.5d0))
should return 536870912 and 0.5d0. However, cmucl returns 536870913 and -0.5d0.
The code in float.lisp for %unary-round
appears to be wrong for numbers outside fixnum range.
At the very least we should extend the range to (signed-byte 32)
, but there would still be issues for other numbers.
Note: See
TracTickets for help on using
tickets.
Fixed. Was not checking for odd-valued results that needed to be rounded to even.