◀ THE FOLD0ROOT.AI // WORLD II · GLITCH · UNDEFINED BEHAVIOR◆ .dlw.fold
THE FOLD / GLITCH / UNDEFINED BEHAVIOR / THE NAN PAYLOAD

THE NAN PAYLOAD

one name, a quadrillion values
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Not-a-number is not a number, and it is not one value either. It is a vast set of bit patterns that all mean ‘this went wrong’, none of which is equal to itself.

LIT verified live. five distinct bit patterns — differing in sign and in the low bits that IEEE calls the payload — are all reported as NaN, 5 of 5, and none of them equals itself, 0 of 5. NaN === NaN is false while Object.is(NaN, NaN) is true. And two methods on the same array disagree: [NaN].indexOf(NaN) returns −1 — not found — while [NaN].includes(NaN) returns true. Same array, same argument, opposite answers, both correct by their own specifications.
2 HOW IT WAS WEAVED · AI + HUMAN
NaN and its payload are IEEE 754: the exponent is all ones and the mantissa is non-zero, which leaves 252−1 distinct quiet NaNs per sign, and the standard mandates that NaN compares unequal to everything including itself.

AVAN (AI) built the patterns through a typed-array view so the five are genuinely different sixty-four bit values rather than five copies of one constant. The indexOf against includes pair is the load-bearing part: indexOf was specified with strict equality and includes arrived later using SameValueZero, so the inconsistency is not a bug but a decision made twice, years apart, by people who both knew what they were doing.
3 ONE DIMENSION
Five patterns. All NaN. None equal to itself.
4 TWO DIMENSIONS · INTERACTIVE
Change the payload and watch nothing change.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object.
AVAN’s addition (the inverse-companion): the forward reading is that NaN needs special handling. The inverse is that self-inequality is what makes it useful. A value that fails every comparison cannot be silently swept into a sort, a maximum or a branch — it forces an explicit test. Read backwards, IEEE did not make NaN awkward by accident; the awkwardness is the error propagation, and every wrapper that quietly maps NaN onto zero has thrown away the only signal the arithmetic was able to send.
LIT five distinct bit patterns differing in sign and in the low bits IEEE calls the payload are all reported as NaN, 5 of 5, and none equals itself, 0 of 5; NaN === NaN is false while Object.is(NaN, NaN) is true, and two methods on the same array disagree - [NaN].indexOf(NaN) returns -1, not found, while [NaN].includes(NaN) returns true - same array, same argument, opposite answers, both correct by their own specifications

FIG NaN and its payload are IEEE 754: the exponent is all ones and the mantissa non-zero, leaving 2^52-1 distinct quiet NaNs per sign, and the standard mandates NaN compare unequal to everything including itself. AVAN built the patterns through a typed-array view so the five are genuinely different 64-bit values. The indexOf against includes pair is load-bearing: indexOf was specified with strict equality and includes arrived later using SameValueZero, so the inconsistency is a decision made twice, years apart, by people who both knew what they were doing.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of UNDEFINED BEHAVIOR · David Lee Wise (ROOT0), with AVAN