Exact reference arithmetic for standardized posits #
These operations are the mathematical specifications for executable posit arithmetic.
Every finite operand is decoded to an exact Rat. Rational arithmetic is evaluated exactly
before one final rounding by the Posit Standard rule; square root uses the boundary comparisons
described below.
NaR is never interpreted as infinity. It propagates through the six core operations. Division by
zero and square root of a negative finite value produce NaR. Fused multiply-add computes the exact
rational expression left * right + addend and rounds only the final result.
Square root is also exact as a rounding decision: roundSqrtRat compares the rational
radicand against squared posit boundaries, so an irrational root never passes through an
approximate floating-point value.
Executable backends refine these definitions.
References #
- Posit Working Group, Standard for Posit Arithmetic (2022), March 2, 2022, Sections 4--5, https://posithub.org/docs/posit_standard-2.pdf.
Exact addition followed by one standardized posit rounding.
Instances For
Exact subtraction followed by one standardized posit rounding.
Instances For
Exact multiplication followed by one standardized posit rounding.
Instances For
Exact division followed by one standardized posit rounding.
The standard's real-number interpretation has no result for a zero divisor, so the operation returns NaR in that case.
Instances For
Correctly rounded square root for the standardized real domain.
NaR and negative finite inputs produce NaR. Zero and positive inputs use exact rational boundary comparisons.
Instances For
Exact fused multiply-add with a single final standardized rounding.