DPD trailing-field bounds and round trips #
Packing groups declets produces a value below 1024 ^ groups; decoding produces a coefficient
below 1000 ^ groups. Encoding then decoding recovers every coefficient within that bound, and
canonicalization preserves the decoded trailing coefficient.
theorem
FloatLib.Floats.Formats.DecimalInterchange.DPD.decodeTrailing_encodeTrailing
(groups n : ℕ)
(h : n < 1000 ^ groups)
:
Packing followed by unpacking preserves every trailing decimal digit.
Canonicalizing redundant declets preserves the complete trailing coefficient.