Exact decimal character conversion #
The reusable decimal carrier denotes an integer times an integral power of ten. Parsing accepts
ASCII decimal integers, fractions, and e/E exponents with optional signs. Each successful parse
denotes an exact rational, without host floating-point conversion.
Every dyadic has a terminating decimal expansion: m / 2^k = (m * 5^k) / 10^k. The formatter
uses that identity, with decimal exponent notation for fractional values. Output size and
exact-integer work grow with the magnitude of the binary exponent.
Instances For
Exact rational meaning of a decimal record.
Instances For
Recognize precisely the ten ASCII decimal digits.
Instances For
Parse an exact decimal rational. Whitespace and nondecimal notation are rejected.
Instances For
Print an integral exponent with an explicit minus sign only when negative.
Instances For
Print a decimal record as a decimal significand with an optional e exponent.
Instances For
Character-string representation of the exact decimal record.
Instances For
Convert a dyadic to an equal decimal using powers of five for negative binary exponents.
Instances For
Exact decimal formatting of a dyadic; every finite input has decimal output.