TorchLean API

FloatLib.Floats.Formats.Posit.Configured.Functions.Basic

Basic posit functions on the public configured carrier #

Every function uses the universal carrier/model codec. Static storage selection therefore does not alter numerical behavior, while users retain one ExecFloat.Posit (bits := n) type.

The public functions lift the corresponding model operations. The codec inverse laws ensure that decoding a result recovers the model result.

@[inline]

Lexicographic successor of the posit representation, with wrapping.

Instances For
    @[inline]

    Lexicographic predecessor of the posit representation, with wrapping.

    Instances For
      @[inline]

      Standard posit absolute value.

      Instances For
        @[inline]

        Standard posit sign function, returning NaR when the input is NaR.

        Instances For
          @[inline]

          Standard nearest integer-valued posit, with ties to an even integer.

          Instances For
            @[inline]

            Standard ceiling to an integer-valued posit.

            Instances For
              @[inline]

              Standard floor to an integer-valued posit.

              Instances For
                @[simp]

                Taking the predecessor after the representation successor restores the original posit.

                @[simp]

                Taking the successor after the representation predecessor restores the original posit.

                @[simp]

                Posit absolute value fixes the unique zero encoding.

                @[simp]

                Posit absolute value propagates Not-a-Real.

                @[simp]

                The posit sign function fixes the unique zero encoding.

                @[simp]

                The posit sign function propagates Not-a-Real.

                @[simp]

                Nearest-integer rounding fixes the unique posit zero.

                @[simp]

                Nearest-integer rounding propagates posit Not-a-Real.

                @[simp]

                Posit ceiling fixes the unique zero encoding.

                @[simp]

                Posit ceiling propagates Not-a-Real.

                @[simp]

                Posit floor fixes the unique zero encoding.

                @[simp]

                Posit floor propagates Not-a-Real.