TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.RoundDyadicImpl.Runtime

Direct generic dyadic rounding #

Generic dyadic rounding executes directly with integer arithmetic. RoundDyadicImpl.Proof proves that these functions refine the logical float model and registers the compiler substitutions. Keeping the implementation here lets runtime backends avoid importing the substantially larger normalization proof.

@[inline]

Direct integer implementation of nearest-even IEEE dyadic rounding.

This is the compiled counterpart of ieeeRoundDyadic. It handles subnormal alignment, normalization carry, signed underflow to zero, and overflow without constructing a logical model value.

Instances For
    @[inline]

    Compiled nearest-even dyadic rounding for every complete format descriptor.

    Instances For