[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dumb DrScheme rational # question

Well, I've always believed that the decimal-style printing should not
be tied to the internal exact-ness or inexactness. The current tradeoff
works well enough for R5RS, but for teaching languages and other
specialized contexts, it just doesn't.

So, I've put my money where my mouth is (gag) and I added
decimal-notation printing for all rationals to DrScheme. If the number
doesn't have a finite decimal expansion, DrScheme uses the an overbar
notation to indicate which suffix of the number repeats forever. I
didn't change the default printing style of any language level, but in
the currently tagged CVS tree, you will find new options on the
language dialog's "details" section.

You should now never have to use inexact numbers, except when you use
operations like sin, sqrt, or log, or when you need the efficiency they

Thanks to Richard Cobbe and Brian Gregor for the impetus to make the
change; I'd been toying with the idea for several years, but never got
around to it.