Modern floating point systems have three flavors of special value. All of them have roots tracing back to the commercial mainframes of the 1950s and 1960s, and even the pioneering computers that preceded them.
The parallelogram diagram misses one critical value, zero, which figures specially in nearly every operation. The only question is whether zero carries algebraic sign. IEEE 754 specifies signed zero.
The sign of zero requires special definition in the arithmetic, because mathematical zero has no sign. For signed zero to be sensible mathematically, \( -0 = +0 \) must be true, as must \( x \pm 0 = x \) for any nonzero \( x \), and many other identities. It is \( x / \pm0 \) for \( x \neq 0 \) that brings out the sign of zero, as we will now see.
Modern floating point systems define some form of \( \infty \). IEEE 754 specifies \( \pm \infty \), not just as the reciprocal of \( \pm 0 \), but also to cope with values just too big to represent as normal numbers. Infinity helps cope with results that fall beyond the overflow threshold.
\[ \pm \infty = \pm 1 / \pm 0 \] where the usual conventions for algebraic sign apply.
The Not-a-Number symbol, or NaN, is the last resort, when no numerical value, even infinite, makes sense. The expression \( \pm 0 / \pm 0 \) is just one example. At least \( \sqrt{-5} \) has a mathematical meaning in the complex plane, but it has no representation in a number system with just real values. NaNs can be stored for missing data in a data set or used to initialize numerical values created while a program is running.
Modern programming languages define entities like
null
, None
, or undefined
to cope with edge cases of all kinds. For a number
system to be meaningful across diverse language
environments and for it to be possible to encode
unusual values in a portable bit format, some
general form of NaN is required. IEEE 754 specified
its NaNs over 40 years ago, to work as seamlessly
as possible in more primitive high level languages.