Decimal datums and cohorts #
A finite datum stores a sign, an integer coefficient, and a quantum exponent:
its value is (-1)^sign * coefficient * 10^quantum. Trailing coefficient zeros
are meaningful representation information. For example, 1 × 10^0 and
10 × 10^-1 are different datums in the same cohort.
This representation layer implements IEEE 754-2019 §§3.3 and 3.5. It supplies neither decimal arithmetic nor its rounding, preferred-exponent, or exception rules.
Instances For
Instances For
Representability at the selected precision and quantum range. NaN payloads have one fewer decimal digit than finite coefficients.
Instances For
The exact rational value of a finite datum; infinities and NaNs have no rational value. Signed zeros remain distinct datums even though both map to zero. Zero bypasses the radix power, so its quantum does not determine the size of an intermediate integer.
Instances For
The zero shortcut preserves the usual coefficient-times-radix-power interpretation.
IEEE 754-2019 §§2.1 and 3.5.1 cohorts preserve the sign, including the sign of zero.
Each infinity forms a singleton cohort. NaNs have no cohort. Width-specific cohorts
restrict this relation to datums satisfying Valid.