TorchLean API

NN.Examples.DeepDives.Floats.EffectiveRounding

Effective Rounding in Tensor Semantics #

This example uses the same shape-indexed tensor operation twice. The FP32 tensor gives the proof-oriented rounded-real semantics. The IEEE32Exec tensor executes binary32 arithmetic from bits. On a finite result, the IEEE bridge and the effective rounding calculation identify the same canonical mantissa and exponent.

This addition executes pointwise in the bit-level IEEE32 model.

Instances For

    Proof-oriented tensors use the same tensor API with rounded-real FP32 scalars.

    Instances For

      Exact subtraction, local spacing, and absorption #

      Sterbenz's lemma certifies the concrete binary32 subtraction $2-1$ as exact.

      Named rounding modes and fused enclosures #

      The public mode API avoids passing a raw integer-rounding function at each call site.

      Instances For

        Directed rounding gives a certified lower endpoint, not merely a differently named value.

        A concrete fused multiply-add lower endpoint, computed directly from binary32 inputs.

        Instances For

          Directed binary32 square-root endpoints for the exact input 2.

          Instances For

            Fixed grids, quantization, and double rounding #

            A signed affine code set with quarter-unit spacing. The construction is not tied to a tensor layout or storage width; those choices only determine the integer code bounds.

            Instances For

              Every in-range code is recovered exactly after dequantization and requantization.

              Four valid codes, represented with the same shape-indexed tensor used by TorchLean models.

              Instances For

                IEEE exception status #

                A training-shaped reduction #