TorchLean API

FloatLib.Floats.ExecFloat.Backends.Word.Small.Finite.Runtime

Native finite decoding for one-word formats #

A flat UInt64 field decoder serves every conventional IEEE format covered by NativeSmallWord.StorageEligible. The executable operations have refinements in Finite.Proof.

@[inline]

Decode the finite significand, including the implicit bit for normal values.

Instances For
    @[inline]

    Decode a finite value through native storage fields.

    An all-ones exponent returns none; zeros, subnormals, and normals retain the exact compact component representation used by FiniteKernel.

    Instances For
      @[inline]

      Native-storage finite addition through the compiled unsigned-scale component kernel.

      The body names FiniteKernel.addComponentsImpl rather than the exact-dyadic addComponents. The two are proved equal in Kernel.Proof, but a runtime module cannot import that proof, so naming the compiled kernel here is what keeps the exact-dyadic body out of generated code.

      Instances For
        @[inline]

        Native-storage finite FMA through the compiled unsigned-scale component kernel.

        As for addFinite?, the body names FiniteKernel.fmaComponentsImpl, the compiled twin of the exact fmaComponents, because the equality between them is proved in a module this runtime cannot import.

        Instances For
          @[inline]

          Native-storage positive square root using the shared compact finite kernel.

          Instances For
            @[inline]

            Native-storage square root for an input already proved positive, finite, and nonzero.

            The proofs state the exact contract of the unchecked field kernel and are erased by compilation. The implementation keeps the one-word decoder and enters the same descriptor-generic square-root kernel used by the arbitrary-width path.

            Instances For