Directed integer rounding of nonnegative rational quotients #
The quotient operations used by directed rational rounding satisfy format-independent order
bounds. Floor rounding lies below the exact real quotient, ceiling rounding lies above it, and
integer lower and upper thresholds are preserved in the expected directions. The ceiling is
Numerics.roundQuotient .up. Whether a quotient is an exact tie, as nearest-away rounding needs to
know, depends only on the rational it represents.
Natural quotient bounds #
The floor quotient is no larger than the ceiling quotient.
The ceiling quotient is at most one larger than the floor quotient.
Multiplying the ceiling quotient back by a nonzero denominator covers the numerator.
Exact real enclosure #
The executable natural ceiling is the exact integer ceiling of the represented real quotient.
The exact real quotient lies below its natural ceiling quotient.
Downward quotient rounding is a lower bound on the exact real quotient.
Upward quotient rounding is an upper bound on the exact real quotient.
Exact rational invariance #
Directed quotient rounding depends only on the represented nonnegative rational.
Successive exact binary scalings may be combined before directed quotient rounding.
Whether a quotient is an exact tie, twice its remainder equal to its denominator, depends only on the represented nonnegative rational.
Successive exact binary scalings may be combined before testing for an exact quotient tie.
Preservation of integer thresholds #
A real power-of-two lower bound survives either directed integer rounding.
A strict real power-of-two upper bound weakly bounds either directed integer rounding.