FP32 rounding tolerances #
These theorems express FloatLib's Model.abs_roundAt_sub_le bounds using approxR
(notation ≈[t]). Each operation has an absolute-only tolerance of half an ULP at its
exact real result. The tolerance therefore depends on the result's magnitude.
FP32 here is a rounded-real model with binary32 precision and an unbounded upper
exponent. It has no NaN or infinity values. These are not native Float32 or LibTorch
kernel correctness theorems; transcendental operations round the exact real function.
Arithmetic (one real op + one rounding step) #
Rounded addition differs from the exact sum by at most half an ULP.
Rounded subtraction differs from the exact difference by at most half an ULP.
Rounded multiplication differs from the exact product by at most half an ULP.
Rounded division follows real division, including its totalized value at zero.
Transcendentals (real function + rounding) #
Rounding the exact real exp result introduces at most half an ULP of error.
Rounding the exact real tanh result introduces at most half an ULP of error.
Rounded logarithm uses mathlib's total real logarithm as its reference.
Rounding the exact real cos result introduces at most half an ULP of error.
Rounding the exact real sin result introduces at most half an ULP of error.
Rounding the exact real sinh result introduces at most half an ULP of error.
Rounding the exact real cosh result introduces at most half an ULP of error.
Rounded square root uses mathlib's total real square root as its reference.
Rounding the exact real abs result introduces at most half an ULP of error.