Densely packed decimal interchange encoding #
IEEE 754-2019 §3.5.2(c)(1) combines the leading decimal digit and the high exponent bits in a five-bit combination field. The remaining digits use Cowlishaw declets. All redundant declets decode; encoding chooses the canonical representation.
Combine a leading digit with the high two exponent bits.
Instances For
Leading digit extracted from a finite combination field (field < 30).
Instances For
High exponent bits extracted from a finite combination field.
Instances For
def
FloatLib.Floats.Formats.DecimalInterchange.DPD.encodeFields
(f : Format)
(leading exponent trailing : ℕ)
:
Assemble the leading digit, biased exponent, and already-packed trailing declets.
Instances For
Encode a finite decimal coefficient and biased exponent.
Instances For
The complete DPD interchange codec. Its laws are proved in DPD.Proof.