TorchLean API

FloatLib.Floats.Formats.Posit.Configured.Storage.Pair.Runtime

Two-limb runtime access for configured posits #

Formats from 65 through 128 bits use a persistent UInt128 pair by default. These operations expose and pack that carrier directly, without constructing a model at the storage boundary.

@[inline]

Read the two persistent limbs without reconstructing the exact-width proof model.

Instances For
    @[inline]

    Store one already-range-checked two-limb encoding directly.

    Unlike pack, this carrier-native boundary performs no natural-number conversion. It is the result constructor for arithmetic kernels whose complete code already resides in UInt128.

    Instances For
      @[inline]
      def FloatLib.Floats.Formats.Posit.Configured.PairCode.pack {format : Format} (width_le : format.bits 128) (bits : ) (hbits : bits < format.modulus) :
      PairCode format

      Pack one already-range-checked complete encoding into two persistent limbs.

      The format-width premise proves that conversion to UInt128 is exact rather than modular.

      Instances For