Notation for TorchLean's FP32 model #
TorchLean uses a proof-oriented float32 model (FP32) defined by:
- a radix $\beta=2$,
- the canonical IEEE-754 binary32 exponent function (
fexp32), and - round-to-nearest, ties-to-even (
rnd32).
This file provides small, ergonomic aliases for the corresponding real-level operators:
round₃₂ x(or ASCIIround32 x): round $x\in\mathbb{R}$ to the binary32 grid.ulp₃₂ xandeps₃₂ x: the ULP scale (and half-ULP) associated with $x$.
We keep these under TorchLean.Floats so they are available where float semantics are in focus,
without polluting unrelated namespaces.
@[reducible, inline]
Real-level binary32 rounding operator for the canonical fexp32/rnd32 configuration.
This is definitionally the same rounding operator used in the NF/FP32 semantics, but phrased as
a function $\mathbb{R}\to\mathbb{R}$ (useful for bridge theorems and error bounds).
Instances For
@[reducible, inline]
One ULP at x for the canonical binary32 exponent configuration.
Instances For
@[reducible, inline]
Convenience abbreviation: half an ULP at x.
Instances For
@[simp]
Binary32 has a smallest grid step, so its ULP at zero is $2^{-149}$.