Rational meaning of P3109 rounding decisions #
The report's fractional part is an exact rational. Natural division implements its floor, and quotient/remainder comparisons implement nearest-even integer rounding. These facts identify every executable rounding decision with §4.7.4, including each possible supplied stochastic word. No distribution or randomness-quality assumption is made.
Reference: P3109 unapproved interim report 4.0.3, revision 34f5964, §4.7.4.
Nearest integer to a nonnegative rational, with ties sent to the even integer.
Instances For
The report's rounding decision in terms of the exact fractional part.
Instances For
Division splits a nonnegative rational into its integer part and exact remainder.
Quotient/remainder nearest-even rounding implements the report's mathematical RNITE.
Binary scaling followed by natural division is the floor of the exact scaled fraction.
The stochastic-C helper computes mathematical nearest-even rounding of the scaled fraction.
Every supplied word is strictly below the modulus specified by its width.
An exact integer is unchanged even by stochastic rounding, for every supplied word.
All nine executable decisions agree with the report's exact rational formulas.