Correctness of direct exact-dyadic posit packing #
The one-pass scale, regime, exponent, fraction, guard, and sticky calculation in
Direct.Runtime refines the exact posit rounding specification at every width. It covers
regimes that consume the payload, appended-bit threshold ties, finite-endpoint saturation, and
negative results obtained through posit negation.
Direct packing avoids the reference rounder's search. Their equality gives both algorithms the same semantics at every configured width.
Complete arbitrary-width rounding #
Direct positive rounding selects exactly the shared exact-dyadic code.
Shift-with-jam preservation #
Retaining a normalized leading window and jamming every discarded one into its low bit preserves the complete direct Posit code.
The theorem is independent of a storage carrier. The retained value has its leading one at index
window, so it occupies window + 1 bits. The bounds 2 ≤ window and
format.payloadBits ≤ window leave room for the rounding information. The dyadic exponent
increases by the discarded shift.
Direct positive rounding always returns a nonnegative finite code.
Direct positive result packing is extensionally the shared dyadic rounder.
Every direct signed code is a valid complete Posit encoding.
Re-encoding the direct code gives the model-valued direct rounder.
Complete direct exact-dyadic rounding equals the exact model rounder.
Complete direct rounding therefore equals exact rational Posit Standard rounding.