4 ms·
"1" in Scheme: >(- (expt 2 64) (- (expt 2 64) 1)) 1 http://people.csail.mit.edu/jaffer/SCM.html http://people.csail.mit.edu/jaffer/SCM.html
by anthk 6y ago
"1" in Scheme:
>(- (expt 2 64) (- (expt 2 64) 1))
1
http://people.csail.mit.edu/jaffer/SCM.html http://people.csail.mit.edu/jaffer/SCM.html
- jhbadger 6y agoAre 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.
- anthk 6y agoTrue, 0. But I think Guile had an exact->inexact function.