Branch equations for nearest-even rational packing #
roundRatScaled rejects a zero denominator, returns a signed zero for a zero numerator, and
otherwise selects an overflow, underflow, subnormal, normal, or carry-out result from the leading
exponent of the quotient. The equations below describe each positive-magnitude branch of the IEEE
path in terms of the descriptor's semantic exponent bounds. They are used in the finiteness and
rounded-real proofs.
Positive packing branches #
The IEEE path of roundRatScaled on a positive nonzero rational, with every executable test
rewritten to the descriptor's semantic exponent bounds and to propositional conditions.
Positive nearest-even packing overflows to positive infinity above the normal range.
Below half of the smallest subnormal, positive nearest-even packing returns positive zero.
In the subnormal range, positive nearest-even packing rounds the quotient on the subnormal grid and promotes a full mantissa to the smallest normal value.
In the normal range without a carry-out, positive nearest-even packing stores the rounded mantissa at the leading exponent.
A carry-out whose incremented exponent still fits stores the smallest mantissa one binade higher.
A carry-out past the largest normal exponent overflows to positive infinity.