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

Re: [Scheme-reports] Padding/placeholders (hashes) in numerical syntax

 | Date: Mon, 5 Sep 2011 18:57:16 +0200
 | From: Peter Bex <Peter.Bex@x>
 | On Sun, Sep 04, 2011 at 09:12:42PM -0400, Aubrey Jaffer wrote:
 | > I believe that R5RS permits engineering-notation.
 | Absolutely; I was wondering how it decides to print 3/4 as 750.0e-3
 | considering 7.5e-1 is equally acceptable, as is 0.75 or 75e-2 or
 | any other exponent prefixed by a suitably scaled number.

In engineering-notation the exponent is always an integer multiple of
3.  SCM scales the matissa to be between 1 and 1000, and omits the
exponent when it is 0.

Engineering-notation is good for viewing floating-point numerical
data.  Unless the data is very erratic, one can tell from looking at
the mantissas when the exponents have changed.

Scheme-reports mailing list