[gambit-list] Results of subtraction don't match "The Scheme Programming Language"

Steve Graham jsgrahamus at yahoo.com
Tue Dec 30 15:07:05 EST 2014


On page16 of the above book, it show (- 1.5 1/2) returning 1.0.
When I do such in Gambit, I get:Gambit v4.7.3

> (+ 1/2 1/2)
1
> (- 1.5 1/2)
1.
Here are some other results:Chicken Scheme#;1> (- 1.5 1/2)

Warning: cannot represent exact fraction - coerced to flonum: "1/2"
1.
#;2>
RacketC:\Users\Steve>racket
Welcome to Racket v6.0.1.
> (- 1.5 1/2)
1.0
>

LarcenyLarceny v0.97 "Funny in the Head" (Aug 19 2009 14:35:39, precise:Win32:unified)

> (- 1.5 1/2)
1.0

>
MIT Scheme(- 1.5 1/2);Value: 1.
Petite Chez Scheme> (- 1.5 1/2)
1.0
> 

SCM 5e7> (- 1.5 1/2)
1.0
>
Why is there such a variety?
Steve    


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20141230/a0c50227/attachment.htm>


More information about the Gambit-list mailing list