[plt-scheme] fractions and decimals

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Tue Jan 21 10:59:02 EST 2003

At 8:39 PM -0600 1/19/03, Jefferson Provost wrote:
>Note that (equal? ...) doesn't work the way you want but (= ...) does:
>  > (equal? 1/8 0.125)
>  > (= 1/8 0.125)

Now THAT's peculiar: I was under the impression that "equal?" was 
implied by all the other equality predicates.

Actually, I knew that Scheme had the exact/inexact distinction, and 
was able to figure out that in R5RS language decimals were defaulting 
to inexact.  As Robbie said, the whole problem only arose because I 
happened to be in R5RS the first time I tried the test suite; it 
shouldn't be an issue in the classroom.

                                      Stephen Bloch
                                   Math/CS Department
                                   Adelphi University

Posted on the users mailing list.