TorchLean API

FloatLib.Floats.Formats.P3109.Arithmetic.Instances

Public P3109 arithmetic capabilities #

Every valid P3109 descriptor supplies addition, subtraction, multiplication, division, square root, and fused multiply-add through common ExecFloat dispatch. Each has one exact arithmetic kernel followed by the report projection. The supplied backend planning policy is retained.

Context-free operations use FloatLib's nearest-even, no-saturation projection policy. Explicit rounding, stochastic random words, saturation, and mixed-format destinations remain available through ExecFloat.P3109.*To. These operations neither raise nor synthesize IEEE exception flags.

The rational real-embedding and decoding proofs are in Arithmetic.Proof; the irrational-root refinement and decoding proofs are in Arithmetic.Sqrt.Proof.

Planner metadata for the exact arithmetic implementation.

The storage class describes the encoded operand, not an intermediate-size bound. Exact rational arithmetic can allocate integers whose sizes depend on the descriptor's exponent range.

Instances For
    @[instance_reducible, always_inline]

    Package the single exact kernel without changing the caller's planning policy.

    Instances For
      @[instance_reducible]

      Report-default negation, including projection of unsigned results.

      @[instance_reducible, always_inline]

      Exact addition with one nearest-even report projection.

      @[instance_reducible, always_inline]

      Exact subtraction with one nearest-even report projection.

      @[instance_reducible, always_inline]

      Exact multiplication with one nearest-even report projection.

      @[instance_reducible, always_inline]

      Exact division with the report's NaN result for every zero denominator.

      @[instance_reducible, always_inline]

      Square root rounded by exact comparisons with the irrational result.

      @[instance_reducible, always_inline]

      Fused multiply-add with no rounded or saturated intermediate product.