Finite-only E5M2FNUZ #
FloatLib.Floats.E5M2FNUZ gives the ONNX finite, NaN-supporting, unsigned-zero E5M2 variant a
distinct Lean type, with type-level identity E5M2FNUZ.Family. That identity prevents accidental
interchange with OCP E5M2, whose infinity and signed zero behavior differs even though both formats
occupy one byte.
The runtime carrier is one UInt8. Balanced and throughput policies select exhaustive proved byte
tables for addition, subtraction, multiplication, division, and square root. The latency policy uses
the exact arithmetic baseline. Fused multiply-add uses the proved generic single-rounding kernel.
Reference #
- ONNX, Float stored in 8 bits, E5M2FNUZ, https://onnx.ai/onnx/technical/float8.html.
The E5M2FNUZ encoding fits in its direct byte carrier.
Certified direct-byte E5M2FNUZ subtraction table.
Instances For
Certified direct-byte E5M2FNUZ multiplication table.
Instances For
Certified direct-byte E5M2FNUZ square-root table.
Instances For
Package the five byte tables with the proved arithmetic FMA baseline.
ONNX E5M2FNUZ: 5 exponent and 2 fraction bits with bias 16, one zero, no infinity, and the negative-zero code as the sole NaN. Values are stored in one byte and their arithmetic reads certified byte tables.
Instances For
Construct E5M2FNUZ from a natural bit pattern, reduced to eight bits.
Instances For
Read the complete E5M2FNUZ encoding byte.