Another number allowed for by computer implementations is . When a module implementing an operator is invoked with values for which the operator is not defined the module will return . For example:
The NAN is not crucial to our development of number systems since it is essentially a crutch to allow for detection of exceptional conditions after they occur. They do allow for compact computer routines. Interval arithmetic routines will detect upcoming exceptional conditions before they result in an application of an operator where it is not properly defined.
The NAN causes further erosion of the comparison operators. Any comparison involving a NAN is false; the NAN is an unordered number. Every pair (x,y) of floating point numbers is ordered in one of three ways unless x or y is , , or .
Jeff Tupper | March 1996 |