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

Re: # in place of a digit.



On Mon, 5 Dec 94 12:24:57 -0500, Gerald Jay Sussman <gjs@martigny.ai.mit.edu> said:

> The idea was that one might print a number with an output format
> that produces more digits than are available in the internal machine
> representation of the number.  The idea is that such a format would
> fill out the printed representation of the number with "#"s rather
> than filling it out with useless (and misleadingly precise) digits.

I'm somewhat confused by this.  The R4RS description of number->string
says that it should produce a result with the minimum possible number
of digits; so in that case, the last one (at worst) would be
misleadingly precise, and it would have to be in there anyways, so
that (string->number (number->string x)) was equal to x.  I know that
those guarantees (or at least the first one) are a R4RS innovation;
was # a pre-R4RS way of allowing number->string do a poorer version of
that?

> On the other hand, if the system kept track of the significance of a
> number, it could very well use this format to indicate known lack of
> significance.  As such this is potentially a very nice feature.

Sure.

david carlton
carlton@math.mit.edu