Re: arithmetic issues Taylor Campbell 25 Oct 2005 05:00 UTC

   Date: Sun, 23 Oct 2005 22:18:40 -0500
   From: Alan Watson <xxxxxx@astrosmo.unam.mx>

   Taylor Campbell wrote:
   > I think it's
   > pretty plain & straightforward that what NaN represents is not a
   > number due to an undefined mathematical operation.  Can you elaborate
   > on what you meant here?

   The IEEE flonum standard precisely defines the conditions under which
   NaNs are produced. For example, in conventional arithmetic, zero divided
   by zero is not defined, but in IEEE flonum arithmetic, zero divided by
   zero is defined to yield a NaN.

It is defined for the sake of computational convenience; what NaN
denotes mathematically is the condition of an undefined operation,
even if it exists as a value that IEEE flonum operations can produce.
There is a distinction between mathematical definedness and IEEE
specification for pragmatic reasons.