Correctness of the configured posit quire interface #
The public raw-word operations are lossless, posit-to-quire conversion preserves exact rational meaning, and the distinguished zero and NaR values are preserved across both conversion directions. The fold theorems at the end transport the standard capacity guarantees to accumulation loops written against the configured carrier.
References #
- Posit Working Group, Standard for Posit Arithmetic (2022), March 2, 2022, Section 5.11, https://posithub.org/docs/posit_standard-2.pdf.
Re-encoding a configured quire's complete bit pattern preserves it.
An in-range unsigned word is unchanged by configured-quire encoding.
Converting posit NaR to its associated quire produces the reserved quire NaR.
Converting posit zero to its associated quire produces the all-zero quire.
Configured posit-to-quire conversion preserves the complete optional exact rational meaning.
The theorem is unconditional: ordinary values are proved to fit the standard quire exactly, and posit NaR maps to quire NaR.
Rounding the reserved quire NaR to a posit produces posit NaR.
Rounding the all-zero quire to a posit produces the unique posit zero.
Accumulation loops #
Configured exact values are the model's exact values of the decoded posits.
Configured exact products are the model's exact products of the decoded posit pairs.
Folding qMulAdd over fewer than 2^31 pairs of ordinary configured posits, starting from the
zero quire, is exact: the result is not NaR and denotes the exact rational sum of the products.
exactProducts? pairs = some products records that no input is NaR and identifies the exact
products. Callers need no additional bounds on the quire coefficients.
Folding qAddP over fewer than 2^(23 + 4n) ordinary configured posits, starting from the zero
quire, is exact.