TorchLean API

FloatLib.Floats.Formats.Posit.Configured.Value.Runtime

Runtime interface for configured posit values #

Configured posit values support packing, exact decoding, classification, and raw-word conversion independently of storage choice.

@[inline]

Decode the statically selected runtime carrier into the exact-width posit proof model.

This boundary does not expose whether the carrier is a byte, machine word, packed pair, or wide bit vector.

Instances For
    @[inline]

    Pack an exact-width posit model into the statically selected runtime carrier.

    Instances For
      @[inline]

      Construct a configured posit from its complete unsigned word.

      Inputs outside the configured width are reduced modulo 2 ^ format.bits, matching Model.ofNatBits.

      Instances For
        @[inline]

        Read the complete posit word as an unsigned natural number.

        Instances For
          @[inline]

          Decode the tapered fields, retaining zero and NaR as separate constructors.

          Instances For
            @[inline]

            Complete rational denotation; NaR remains an exceptional Not-a-Real observation.

            Instances For
              @[inline]

              Exact rational value of an ordinary configured posit, or none exactly for NaR.

              Instances For
                @[inline]

                Whether the configured value is the unique zero encoding.

                Instances For
                  @[inline]

                  Whether the configured value is the unique Not-a-Real encoding.

                  Instances For