Hacker News new | ask | show | jobs
by anthk 1929 days ago
"1" in Scheme:

    >(- (expt 2 64) (- (expt 2 64) 1))
    1
http://people.csail.mit.edu/jaffer/SCM.html
1 comments

Are you sure that isn't just doing integer math? I don't have a scheme implementation handy, but I tried it in sbcl Common Lisp and while (- (expt 2 64) (- (expt 2 64) 1)) does yield 1,

(- (expt 2.0 64) (- (expt 2.0 64) 1)) yields 0.

True, 0. But I think Guile had an exact->inexact function.