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

Re: arithmetic issues

Aubrey Jaffer scripsit:

> For an interpreter this would mean that 1/2 read before the full-tower
> module was loaded could be an inexact 0.5; but after loading 1/2 would
> read as an exact 1/2.  Unpredictability is bad.

It would merely mean that 1/2 would be an error (and preferably would
signal an error as well).  Of course, #e1/2 would still be an inexact 0.5.

> I recommend 12.bits minimum precision for both fixnums and flonums.

I think that's way too small, particularly if we are going to explicitly
adopt CL's link between fixnums and {string,vector} indices.

> Both Common-Lisp and SLIB implement MOST-POSITIVE-FIXNUM and
> MOST-NEGATIVE-FIXNUM, which would be good additions to R6RS.


> Its time to move beyond the machine-language mindset.  I code in
> Scheme because I want a high-level language.

Agreed.  I've been pointing out in #scheme that the Lisp/Scheme community,
like the Fortran and ML communities (and unlike assembler, Perl, Python,
and Haskell communities), suffered a psychological wound in the early
days of the form "Your language is too slow, therefore you suck" that has
left it with an obsession with speed, speed, speed.

> Being error objects, syntax for NaNs should be unspecified.

I don't see how that follows.

> None of the examples in SRFI-77 return -0.0 unless they are passed
> -0.0 as an argument.  Does -0.0 result only from a literal -0.0
> constant?
> In an implementation with -0.0, what is the result of (* -5.0 0.0)?
> -0.0 is insufficiently specified by SRFI-77; it will be a portability
> killer.

The IEEE standard is our friend here.

Said Agatha Christie / To E. Philips Oppenheim  John Cowan
"Who is this Hemingway? / Who is this Proust?   jcowan@xxxxxxxxxxxxxxxxx
Who is this Vladimir / Whatchamacallum,         http://www.reutershealth.com
This neopostrealist / Rabble?" she groused.     http://www.ccil.org/cowan
        --author unknown to me; any suggestions?