[cmucl-ticket] #10: round is sometimes wrong for numbers bigger than most-positive-fixnum

cmucl cmucl-devel at common-lisp.net
Fri May 18 22:06:46 UTC 2007


#10: round is sometimes wrong for numbers bigger than most-positive-fixnum
--------------------+-------------------------------------------------------
 Reporter:  rtoy    |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  minor   |   Milestone:          
Component:  Core    |     Version:  19d     
 Keywords:  round   |  
--------------------+-------------------------------------------------------
 {{{(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.

-- 
Ticket URL: <http://trac.common-lisp.net/cmucl/ticket/10>
cmucl <http://common-lisp.net/project/cmucl>
cmucl


More information about the cmucl-ticket mailing list