Email list hosting service & mailing list manager


Re: reading NaNs Aubrey Jaffer 24 Oct 2005 20:13 UTC

 | From: "Marcin 'Qrczak' Kowalczyk" <xxxxxx@knm.org.pl>
 | Date: Mon, 24 Oct 2005 20:17:43 +0200
 |
 | Aubrey Jaffer <xxxxxx@alum.mit.edu> writes:
 |
 | > We worked through this issue in SRFI-70.  I think SRFI-70's
 | > treatment is Schemely, compatible with IEEE-754, and doesn't
 | > unnecessarily constrain implementations:
 | >
 | >   The notation 0/0 is used within this report to designate a
 | >   numerical error-object.  A numerical function may return such
 | >   an object when no other number (including real infinities) is
 | >   the correct value.  An implementation may report a violation of
 | >   an implementation restriction in any calculation for which the
 | >   result would be 0/0.
 |
 | It's not compatible with IEEE-754 because it doesn't guarantee that
 | by default operations like (/ 0.0 0.0) produce NaN.

Aren't there IEEE-754 modes which throw an exception rather than
returning NaN?

If the hardware returns a NaN, what the Scheme implementation does
with the NaN is not within the scope of IEEE-754.