TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.Format.Runtime

Compiled binary format constants #

Layout proofs are easiest to read with powers such as 2 ^ fmt.expWidth; compiled code is better served by left shifts. Frequently used format values therefore have shift-based implementations, with proved equalities registered for compiler substitution.

Source-level theorems use the mathematical definitions; compiler substitutions replace them with the proved shift formulas.

@[inline]

Shift-based compiled implementation of bias.

Instances For
    @[inline]

    Shift-based compiled implementation of ieeeMinSubnormalExponent.

    Instances For
      @[inline]

      Compiled implementation of normalMantissaExpOffset.

      Instances For
        @[inline]

        Shift-based compiled implementation of ieeeMaxNormalExponent.

        Instances For
          @[inline]

          Shift-based compiled implementation of ieeeMinNormalExponent.

          Instances For
            @[inline]

            Compiled implementation of subnormalAlignExp.

            Instances For
              @[inline]

              Shift-based compiled implementation of expAllOnesNat.

              Instances For
                @[inline]

                Shift-based compiled implementation of fracMaskNat.

                Instances For
                  @[inline]

                  Shift-based compiled implementation of expMaskNat.

                  Instances For
                    @[inline]

                    Shift-based compiled implementation of signMaskNat.

                    Instances For
                      @[inline]

                      Shift-based compiled implementation of quietBitNat.

                      Instances For
                        @[csimp]

                        Compiler substitution of exponent-bias exponentiation by the equivalent shift kernel.

                        @[csimp]

                        Compiler substitution of the all-ones exponent mask by the equivalent shift kernel.

                        @[csimp]

                        Compiler substitution of the fraction mask by the equivalent shift kernel.

                        @[csimp]

                        Compiler substitution of the shifted exponent mask by the equivalent shift kernel.

                        @[csimp]

                        Compiler substitution of the sign mask by the equivalent shift kernel.

                        @[csimp]

                        Compiler substitution of the quiet-NaN bit by the equivalent shift kernel.