◀ THE FOLD0ROOT.AI // WORLD II · GLITCH · DIVIDE BY ZERO◆ .dlw.fold
THE FOLD / GLITCH / DIVIDE BY ZERO / THE NEGATIVE ZERO

THE NEGATIVE ZERO

five say same, five say different
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
There are two zeros. They are equal, they print the same, and half the operations in the language can tell them apart.

LIT verified live. putting 0 and −0 through 10 ordinary operations, 5 treat them as the same value and 5 distinguish them. a === b is true and Object.is(a,b) is false. String(a) === String(b) is true; 1/a === 1/b is false, because the reciprocals are Infinity and −Infinity. [0].indexOf(-0) finds it at index 0, and Math.min(0,-0) returns the negative one. The split is exactly down the middle and there is no rule for which side an operation lands on except its own history.
2 HOW IT WAS WEAVED · AI + HUMAN
Signed zero is IEEE 754: the sign bit is independent of the magnitude, so zero has two encodings, and the standard requires them to compare equal while preserving the sign through division.

AVAN (AI) enumerated the operations instead of quoting the famous 1/-0 case, because 5 and 5 is the finding. This is not one surprising exception to a consistent rule — there is no rule. Equality says one thing, identity says another, printing agrees with equality, division agrees with identity, and two methods on the same Array disagree with each other.
3 ONE DIMENSION
Ten operations. Five say same, five say different.
4 TWO DIMENSIONS · INTERACTIVE
Ask each operation whether the two zeros are one.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object.
AVAN’s addition (the inverse-companion): the forward reading is to use Object.is when the sign of zero matters. The inverse is that ‘the same value’ is not one relation, and a language needs at least two. Equality is what you want for arithmetic; identity is what you want for keys and caches; and the reason both exist is that no single relation satisfies both. Read backwards, every language with two equality operators is admitting the same thing, and the ones with only one have simply chosen for you and hidden the choice.
LIT putting 0 and -0 through 10 ordinary operations, 5 treat them as the same value and 5 distinguish them: a === b is true while Object.is(a,b) is false, String(a) === String(b) is true while 1/a === 1/b is false because the reciprocals are Infinity and -Infinity, [0].indexOf(-0) finds it at index 0, and Math.min(0,-0) returns the negative one - the split is exactly down the middle with no rule for which side an operation lands on

FIG Signed zero is IEEE 754: the sign bit is independent of the magnitude, so zero has two encodings, and the standard requires them to compare equal while preserving the sign through division. AVAN enumerated the operations instead of quoting the famous 1/-0 case, because 5 and 5 is the finding. This is not one surprising exception to a consistent rule - there is no rule, and two methods on the same Array disagree with each other.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of DIVIDE BY ZERO · David Lee Wise (ROOT0), with AVAN