Verified native-word rounding #
The one-word nearest-even shift and quotient kernels agree with the shared arbitrary-precision definitions. The compiler substitutions therefore change only the representation used for bounded inputs, not the numerical result.
Native word rounding agrees exactly with the generic natural-number rounder.
Capacity-selected nearest-even shifting agrees with arbitrary-precision rounding.
The compiler uses native nearest-even shifting for one-word inputs and the arbitrary-precision definition otherwise.
Native quotient rounding agrees with natural-number quotient rounding whenever the denominator is nonzero and the incremented quotient fits in one word.
No bound on den is needed: the kernel compares the remainder with den - remainder instead of
doubling it, so its intermediates never wrap.
The native and arbitrary-precision branches compute the same nearest-even natural-number quotient.
The compiler uses native quotient rounding for bounded inputs and the arbitrary-precision definition otherwise.