Public P3109 arithmetic capabilities #
Every valid P3109 descriptor supplies addition, subtraction, multiplication, division, square
root, and fused multiply-add through common ExecFloat dispatch. Each has one exact arithmetic
kernel followed by the report projection. The caller's backend planning policy is kept.
Context-free operations use FloatLib's nearest-even, no-saturation projection policy. Other
rounding modes, stochastic random words, saturation, and mixed-format destinations are available
through the mode, saturation, and target options of ExecFloat.P3109.add and its siblings.
These operations neither raise nor synthesize IEEE exception flags.
Literals round once from their exact rational value with the same default policy, and == is
numerical equality: NaN compares unequal to every value, itself included.
The rational real-embedding and decoding proofs are in Arithmetic.Proof. The irrational-root
refinement and decoding proofs are in Arithmetic.Sqrt.Proof.
Planner metadata for the exact arithmetic implementation.
The storage class describes the encoded operand, not an intermediate-size bound. Exact rational arithmetic can allocate integers whose sizes depend on the descriptor's exponent range.
Instances For
Package the single exact kernel without changing the caller's planning policy.
Instances For
Report-default negation, including projection of unsigned results.
A natural literal rounds once, nearest-even with no saturation request.
A decimal or scientific literal rounds once from its exact rational value.
== is numerical equality, so NaN compares unequal to every value, itself included.
Exact addition with one nearest-even report projection.
Exact subtraction with one nearest-even report projection.
Exact multiplication with one nearest-even report projection.
Exact division with the report's NaN result for every zero denominator.
Square root rounded by exact comparisons with the irrational result.
Fused multiply-add with no rounded or saturated intermediate product.