> Since Guile now supports exact rationals, shouldn't it return an exact result?

I actually agree with you (I implemented rationalize in Guile, and originally
it always returned a ratio -- why else call it "rationalize"?), but Marius
pointed out that R5RS says "With the exception of inexact->exact, the 
operations described in this section must generally return inexact results
when given any inexact arguments" in the section including rationalize.
I doubt that R6RS fixed this bug.  So, to get an exact result you need to
give exact arguments:

guile> (rationalize (inexact->exact .33) 1/10)
1/3




Reply via email to