[plt-scheme] fractions and decimals
Stephen Bloch wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> I'm playing with the new "test suite" feature, and was surprised to
> discover that (cube 1/2) is NOT 0.125 (although it DOES match 1/8). On
> further investigation, I found that (equal? 0.125 1/8) returns true in
> Beginner mode, but #f in R5RS and textual mzscheme. Whazzap?
Note that (equal? ...) doesn't work the way you want but (= ...) does:
> (equal? 1/8 0.125)
#f
> (= 1/8 0.125)
#t
>
Jeff