TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.Conversion.Text.Formatting

Binary external character output #

Exact decimal and hexadecimal output preserve finite values, signed zeros, infinities and NaN diagnostics. Requested precision is an arbitrary positive digit count. Both radices use the shared digit-grid and carry calculation. Exponents are unbounded integers, so output can raise inexact but cannot overflow or underflow. Signaling NaNs retain their signaling state without invalid.

External conversion is explicit through formatDecimal, formatHex, or formatWithStatus. The existing format and ToString retain the compact dyadic diagnostic display, which omits NaN metadata.

Radix of the external significand; hexadecimal output still has a decimal binary exponent.

  • decimal : TextRadix

    Decimal digits and an optional e exponent.

  • hexadecimal : TextRadix

    Hexadecimal digits with a 0x prefix and mandatory p exponent.

Instances For
    @[reducible, inline]

    Exact output or an arbitrary positive significant-digit count, shared with decimal formats.

    Instances For

      A generated external character sequence and the exceptions raised while producing it.

      • text : String

        Decimal, hexadecimal, infinity or diagnostic NaN text.

      • Output rounding can raise inexact; all other exception indicators remain clear.

      Instances For

        Integer magnitude rounding for an external digit grid, using existing exact integer rounders.

        Instances For

          Exact or significant-digit output for an unrounded dyadic, with numerical inexactness.

          Instances For

            Format any binary descriptor at exact or requested precision, preserving special metadata.

            Instances For

              Exact decimal external output, preserving signed zero and complete NaN metadata.

              Instances For

                Exact hexadecimal display, including the complete diagnostic spelling for a NaN.

                Instances For

                  Host-independent diagnostic display, using compact dyadic text for finite values. Use formatDecimal or formatHex for external conversion with NaN metadata.

                  Instances For