Correctness of two-word fused multiply-add #
Every accepted result of Fma.Runtime is the exact finite kernel's answer. The proof follows the
one-word FMA proof: fmaFieldsWords_refines matches the alignment branches of fmaFieldsWords?
with FiniteScaleAdd.roundSum at round offset 0. Four-word magnitudes are reduced to two words
with normalizeJam128, which FiniteProductRound.round_shiftRightJam shows does not change the
rounding, and then go through the two-word rounder of Addition.Proof. The sticky alignments reuse
the natural-number lemmas of the one-word addition kernel.
Rounding four-word magnitudes #
A four-word magnitude rounds like its sticky two-word normalization.
An accepted aligned four-word combination is the exact signed-magnitude combination.
Sticky alignments #
Field fused multiply-add #
An accepted field FMA is the exact kernel's rounded sum of the product and the addend.
The hypotheses give the product at most 2 * fracWidth + 2 bits and the addend at most
fracWidth + 1, with both scales below 2 ^ 34 and at most 120 fraction bits.
Storage words and model entry points #
An accepted two-word FMA is the exact compact finite kernel's answer.
An accepted storage-word FMA is the model-level two-word FMA.
Two-word fused multiply-add and the generic finite kernel agree on every input.