TorchLean API

FloatLib.Numerics.Exact.DecimalText.Special

Shared ASCII infinity and NaN spellings #

The caller supplies the special-value constructors and interprets the diagnostic suffix. The scanner accepts case-independent Inf/Infinity/NaN/sNaN and decimal payload digits. An absent suffix denotes zero; the binding chooses its meaning.

Match a lowercase ASCII keyword case-insensitively, leaving the remaining characters unchanged.

Instances For

    A missing diagnostic suffix denotes payload zero; otherwise every character must be a digit.

    Instances For
      def FloatLib.Numerics.SpecialText.parseSpecial {α : Type} (infinity : Boolα) (nan : BoolBoolα) (negative : Bool) (characters : List Char) :

      Parse the unsigned part of a special value, consuming the entire input. The nan constructor receives the sign, signaling bit, and payload, in that order.

      Instances For
        def FloatLib.Numerics.SpecialText.nanCharacters (negative signaling : Bool) (payload : ) :

        Exact special output, retaining sign, signaling state, and diagnostic digits.

        Instances For

          Infinity output preserves the sign and uses the full IEEE name.

          Instances For