Binary32 observation and error contracts #
These interfaces connect TorchLean's binary32 observations to FloatLib's real semantics. Optional observations distinguish finite values from infinities and NaNs. ULP queries return the exponent of the spacing at a finite value, and each arithmetic error bound follows from FloatLib's rounding theorem with the original finiteness hypotheses.
Real observation of a finite word; infinities and NaNs have no real observation.
Instances For
Optional real observation succeeds exactly when the word is finite.
A finite word has the same optional and total real observations.
A nonfinite word has no optional real observation.
ULP exponent of a finite word, including the subnormal spacing at zero.
Instances For
ULP queries succeed precisely on finite words.
Infinities and NaNs are exactly the words without a finite ULP exponent.
The executable ULP exponent gives the exact real spacing at a decoded value.
A successful ULP query identifies the real spacing directly.
Whether adding the second word leaves the first word unchanged.
Instances For
An observed absorption agrees with the rounded-real addition.
Finiteness checks suffice to establish rounded-real absorption.
Effective nearest-even representation of a finite subtraction.
Effective nearest-even representation of a finite division result.
Optional addition result characterized by one real rounding.
Optional multiplication result characterized by one real rounding.
Optional fused multiply-add result characterized by one real rounding.
Optional square-root result characterized by one real rounding.
Optional division result, including finite division by infinity.
Minimum of two finite words remains finite, including either signed zero.
Maximum of two finite words remains finite, including either signed zero.
Optional minimum agrees with real minimum on finite inputs.
Optional maximum agrees with real maximum on finite inputs.
Normal nonzero results have relative error at most binary32 unit roundoff.
Half-ULP absolute error for a finite addition result.
Half-ULP absolute error for subtraction of finite values with a finite result.
Half-ULP absolute error for a finite multiplication result.
Half-ULP absolute error for a finite division result.
Half-ULP absolute error for a finite single-rounding fused multiply-add result.
Half-ULP absolute error for a finite square-root result.