Quotient and exponent semantics #
Exact rational rounding reduces to an integer quotient after a power-of-two rescaling. This
module proves bounds for small quotients and relates the scaled leading exponent to the order of
the numerator and denominator. It also identifies the subnormal and normal grid exponents used
by roundAt.
These lemmas supply the bounds and exponent identities used by the nearest-even packing proofs.
A quotient at or below one half rounds to the even integer zero.
A positive proper fraction rounds to either zero or one.
If a scaled rational's leading exponent is negative, its scaled numerator is strictly smaller than its denominator.
Values whose scaled leading exponent is below -1 are strictly below one half of a grid unit and
therefore round to zero under nearest-even.
Nearest-even subnormal-path rounding is at most the smallest normal mantissa.
Format exponent selection #
The nearest-even implementation's half-min-subnormal cutoff in semantic form.
Values below the normal range use the descriptor's minimum-subnormal grid.
Normal values use the descriptor's precision-shifted rounded-real grid.