TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.Conversion.Text.Digits

Exact and significant-digit text of binary values #

Exact decimal and hexadecimal output preserve every finite value. 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. Model.format selects these digits through its style option.

Radix of the external significand. Hexadecimal output writes its binary exponent in decimal.

  • decimal : TextRadix

    Decimal digits and an optional e exponent.

  • hexadecimal : TextRadix

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

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, and every other exception indicator stays clear.

    Instances For

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

      The magnitude x is nonnegative. Nearest-away rounding is Numerics.roundQuotient .nearestAway on its numerator and denominator, and rounding away from zero is the ceiling.

      Instances For
        @[inline]

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

        Instances For