TorchLean API

FloatLib.Floats.ExecFloat.Backends.FixedLimb.Pair.Fma.Proof

Correctness of two-word fused multiply-add #

The specialized path accepts normal operands when the product and addend have the same sign and the addend's scale is exactly the product scale plus fracWidth. Their sum fits in a UInt256 accumulator and is rounded once using the product rounder.

fmaNormalSameSignAligned_refines identifies accepted results with the generic finite kernel. fmaFinite_eq extends the equality to the complete candidate chain, which uses the generic implementation on all other inputs. Runtime clients can import Fma.Runtime separately.

Fixed-limb representation lemmas #

The scale offset of the addend fits a native word.

Normalization and nearest-even rounding #

Equal-sign aligned fast path #

Every result accepted by the aligned pair FMA kernel equals the exact finite kernel.

Complete finite dispatcher #

The two-word finite FMA chain equals the width-generic exact finite kernel.