Numerical guarantees for exact coefficient rounding #
The computed coefficient fixes nonnegative integers, brackets the exact magnitude, satisfies directed inequalities, and has at most half a grid unit of error in either nearest mode.
Every nonnegative integer is fixed in every rounding direction.
The rounded coefficient is one of the two adjacent integer grid points.
A directed or nearest rounding changes a nonnegative value by less than one grid unit.
Both nearest modes have an error of at most half an integer grid unit.
Rounding toward zero does not increase magnitude.
Positive upward rounding is an upper enclosure.
Upward rounding is an upper enclosure for either sign.
Downward rounding is a lower enclosure for either sign.
At an exact midpoint, nearest-even chooses the even adjacent coefficient.
Nearest-away increases magnitude at every exact midpoint, for either sign.
The error bound scales by the actual decimal quantum, for any exponent.
An integer upper bound on the magnitude remains an upper bound after any rounding.