Decimal word assembly and special values #
IEEE 754-2019 §3.5.2 reserves combination fields 11110 for infinity and
11111 for NaN in both encodings. The next bit is one for a signaling NaN.
Canonical encodings clear unused bits. A decoder accepts every word, retaining
the sign and the NaN's signaling bit and decimal payload.
Codec separates these shared rules from BID/DPD coefficient encoding.
encode? rejects unrepresentable datums; it does not round them.
Executable coefficient encodings, separated from their laws in Codec.Proof.
Finite decoding returns (coefficient, biasedExponent).
Pack a finite coefficient and biased exponent into the unsigned payload.
Recover a finite coefficient and biased exponent from the unsigned payload.
Encode the diagnostic payload of a NaN.
Decode the diagnostic payload of a NaN.
Instances For
Re-encode a decoded datum, clearing unused special-value bits and replacing redundant significand encodings by their canonical representatives.