Not-a-Number


Not-a-Number

(mathematics)(NaN) An IEEE floating point representationfor the result of a numerical operation which cannot return avalid number value. A NaN can result from multiplying aninfinity by a zero, or from subtracting one infinity fromanother NaN is encoded as a special bit pattern which would otherwise represent a floating-point number. Itis used to signal error returns where other mechanisms are notconvenient, e.g. a hardware floating-point unit and to allowerrors to propagate through a calculation.

Similar bit patterns represent positive and negativeoverflow and underflow and the positive and negativeinfinities resulting from division by zero.

Bit patterns.

[ANSI/IEEE Std 754-1985].