TorchLean API

FloatLib.Floats.ExecFloat.Backends.Word.Narrow.Rounding.Runtime

Native binary32 product rounding #

The machine-word product rounder serves multiplication, aligned addition, and fused multiply-add. Its correctness theorem lives in Rounding.Proof, keeping execution-only imports independent of the proof development.

@[inline]

Round the signed magnitude product * 2^(scale - 298) to binary32, with sign sign and subtraction in Int.

Correctness holds for every UInt64 magnitude when scale ≤ 506; callers establish this bound. In particular, finite multiplication supplies a product below 2^48.

Instances For