Mathematical semantics of P3109 rational arithmetic #
Finite arithmetic is exact rational arithmetic, and rational embedding into the reals preserves the complete expression. The algebraic results describe arithmetic before rounding. The decoding theorems connect the public executable operations to one report projection of that exact result.
Exact closed addition is commutative, including exceptional operands.
Exact closed multiplication is commutative, including zero times infinity.
Exact closed addition is associative; opposite infinities remain indeterminate.
Subtracting a finite datum from itself gives the unique exact zero.
Zero denominators are NaN, even for infinite numerators.
Every finite numerator divided by either infinity gives the unique zero.
Finite nonzero division cancels before any destination rounding.
Finite fused multiply-add retains the whole rational expression.
Fused add-add is independent of the grouping of the exact additions.
Rational addition embeds as addition in the reals.
Rational subtraction embeds as subtraction in the reals.
Rational multiplication embeds as multiplication in the reals.
Nonzero rational division embeds as division in the reals.
FMA computes the real expression with no rounded intermediate product.
The executable unary operation decodes to one projection of its exact closed result.
The executable binary operation decodes to one projection of its exact closed result.
The executable fused operation decodes to one projection of the whole exact expression.
Finite FMA is one projection of the exact rational product plus addend.