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

Re: reading NaNs

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.



 | From: "Marcin 'Qrczak' Kowalczyk" <qrczak@xxxxxxxxxx>
 | Date: Tue, 25 Oct 2005 02:39:04 +0200
 | 
 | Aubrey Jaffer <agj@xxxxxxxxxxxx> writes:
 | 
 | >  | >   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?
 | 
 | There are, there are useful too, but they must be explicitly turned
 | on.  So the above description is good as long as "may" means that
 | the programmer chooses the behavior.
 | 
 | > If the hardware returns a NaN, what the Scheme implementation
 | > does with the NaN is not within the scope of IEEE-754.
 | 
 | I disagree. IEEE-754 specifies the language-independent interface,
 | as seem from the point of view of the programmer.

According to IEEE-754:

  user.  Any person, hardware, or program not itself specified by this
  standard, having access to and controlling those operations of the
  programming environment specified in this standard.

A Scheme implementation is a program; thus it qualifies as a user.
IEEE-754 does not constrain its behavior.