Blog
Every format we compare against has its own reference implementation, written from its specification — after five bugs that all weakened the competitor and all pointed the same way.
If you compare your numeric format against others, you have to implement the others. That sounds like a chore and it is where the result is decided.
I implemented five competitor formats from memory. Every one had a bug, and every bug weakened the competitor:
| # | format | the error |
|---|---|---|
| 1 | MX shared scale | ceiling instead of floor(log2 max) − emax |
| 2 | E2M1 | missing its subnormal — 7 magnitudes, not 8 |
| 3 | NF4 | a symmetric reconstruction instead of the real 16-value table |
| 4 | E4M3 | reserved NaN encoding ignored — max 480 instead of 448 |
| 5 | E5M2 | reserved exponent ignored — max 114688 instead of 57344 |
Five for five, one direction. That is not luck and it is not dishonesty — it is structural.
Every one of those five is a simplification. A subnormal, a reserved encoding, an asymmetric table — these are exactly the details a format adds to work better at the edges of its range.
Implementing from memory implements the IDEA of the format, and the idea is always simpler than the specification.
So implementing from memory hands your competitor a worse version of itself, every time, in the direction that favours you. You do not choose the bugs. You choose not to open the spec.
Twenty-three reference models, one per format family we compare against, each written from the format’s own specification or its published reference implementation:
When a paper reports beating E4M3 or NF4, the question is not what the numbers are. It is where the competitor’s implementation came from. Three answers:
The third looks conscientious and is not. A paper describing a format gives you the idea, not the specification, and the gap between them is where all five of my bugs lived.
One concrete check costs nothing: E4M3 maxes at 448 and E5M2 at 57344. If a comparison implies 480 or 114688, the reserved encodings were skipped and the competitor was handed extra range it does not have.
Every figure above is measured, and the limits are named with it.