Rational semantics of dyadic arithmetic #
Field-level multiplication and fused multiply-add agree with their record-based expressions. Addition and subtraction preserve rational denotation, including when the exact result is zero.
For addition, align the operands at the smaller exponent and add their signed integer
significands. The main argument shows that recovering the sign and magnitude with natAbs
preserves that sum.
Field-level operations #
Multiplication multiplies the stored significands.
Scalar-field FMA is multiplication followed by exact addition, with no intermediate rounding.
Structural addition laws #
Normalize addition when the left operand stores zero.
A nonzero right operand is returned unchanged. If both operands store zero, the result uses the canonical zero exponent and the shared signed-zero rule. In either case the left exponent is irrelevant.
Normalize addition when the right operand stores zero.
This is the symmetric form of add_of_left_significand_eq_zero; in particular, the right
exponent never affects the result.
Adding two stored zeros returns the canonical zero exponent and preserves a negative sign only when both inputs are negative.
At a shared exponent, opposite signs subtract magnitudes and retain the sign of the larger left operand.
Exact addition is structurally commutative, including the signed-zero convention.
This is stronger than commutativity of rational denotation: both sides produce the same stored zero sign and exponent.
At a shared exponent, opposite signs subtract magnitudes and retain the sign of the larger right operand.
Align a nonzero right operand at the smaller left exponent before exact addition.
This is the mathematical bridge used by bounded-word kernels that perform the shift explicitly.
Align a nonzero left operand at the smaller right exponent before exact addition.
Subtract an opposite-sign magnitude one exponent below a larger left operand.
Alignment doubles the higher-exponent significand, after which this is ordinary equal-exponent subtraction. The theorem is independent of any concrete floating-point width.
Symmetric adjacent-exponent subtraction with the larger magnitude on the right.