Two nearly-equal numbers, both already rounded on the way in, walk into a subtraction.
The leading bits annihilate and the rounding dust gets promoted to the front of the number.
Finish Operations Level 3 first. It ends right at this cliff edge.
float8 packs a real number into a single byte, 8 bits. Under the hood it's just scientific notation, in binary.
Decimal scientific notation writes a number as its significant digits (one nonzero digit, a point, then the rest) times a power of ten: e.g. 6.022 × 1023, where 6.022 are the digits that carry the value and 1023 sets the scale. float8 (E4M3) does the same in base 2, splitting its 8 bits into 1 sign, the significant digits (the mantissa), and the power of two (the exponent):
value = ±1.mmm × 2e−7
The 3 mantissa bits are the digits after the point. The leading 1 is always there, so it isn't stored. The 4 exponent bits set the scale: they are read as a number 0–15, then 7 is subtracted, giving powers from 2−6 up to 28.
One exception: when the exponent bits are all zero, the leading digit flips to 0 and the scale pins to its smallest, 2−6:
value = ±0.mmm × 2−6
That's how float8 reaches 0 (all bits zero) and the tiny values between 0 and 2−6. At the top end, value = ±448 (exponent 1111, mantissa 110), and value = NaN (exponent 1111, mantissa 111).
Toggle the bits and watch the value react.
8 bits: 1 sign · 4 exponent (bias 7) · 3 mantissa.
value = 1.mmm × 2e−7. The leading 1 is implicit.
value = 0.mmm × 2−6. Zero or subnormal, when exponent is 0000.
value = ±448. Max magnitude, when exponent is 1111 and mantissa 110.
value = NaN, when exponent is 1111 and mantissa 111.