Re: [Scheme-reports] Padding/placeholders (hashes) in numerical syntax Peter Bex (05 Sep 2011 16:58 UTC)

Re: [Scheme-reports] Padding/placeholders (hashes) in numerical syntax Peter Bex 05 Sep 2011 16:57 UTC

On Sun, Sep 04, 2011 at 09:12:42PM -0400, Aubrey Jaffer wrote:
>  | SCM: Inexact complex numbers only.  Test "+nan.0+nan.0i" blows up
>  | with "Wrong type passed to make-rectangular: 0/0" error.  When this
>  | is commented out, 28 errors.
>
> Making string->number case insensitive for infinities and nans
> <http://groups.csail.mit.edu/mac/ftpdir/users/jaffer/scm.zip> reduces
> this to 19 "ERROR"s.  Seven of these are "SERIALIZATION ERROR"s due to
> SCM using engineering notation for numbers greater than 1000. or less
> than -1000, or between -1 and 1.  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.

Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports