Hi,

I'm just an sbcl user like you, and I have tried the same with the latest stable 1.0.51 (compiled from source on x86-64 debian)

CL-USER> (round (* 10.004939019999991d0 1e8))
1000493902
-8.344650268554688d-7

So, my guess is that whatever issue has been with the 1.0.46/47, sbcl developers seem to have solved it with 1.0.51. Perhaps you could test your code with that one and see if it works?

2011/9/2 Peter Keller <psilord@cs.wisc.edu>
Hello,

I'm writing some math software using SBCL 1.0.47 (and 1.0.46 gives the
same response) and I'm curious why I get this output:

* (round (* 10.004939019999991d0 1e8))

1000493901
0.9999991655349731d0

I don't expect that output....

On CLISP 2.48 I get this:

[1]> (round (* 10.004939019999991d0 1d8))
1000493902 ;
-8.344650268554688d-7

On ecl 11.1.1 I get this:

> (round (* 10.004939019999991d0 1e8))

1000493902
-8.344650268554688d-7

Needless to say, I spent quite a few days tracking this down. Is there
a known bug inside of SBCL concerning double-float representation that
I'm hitting? Or am I so close to the available manitissa bits that I'm
hitting undefined behavior?

Thank you.

-pete

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Sbcl-help mailing list
Sbcl-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help



--
Poći ću s vama jer volim šalu, hoću da vidim ježa budalu.
Put u Japan - http://ofcan.wordpress.com