pub(crate) const fn u32_rem(n: u32, d: u32) -> u32Expand description
Remainder calculation, constant time for a given divisor d.
Based on “Faster Remainder by Direct Computation: Applications to Compilers and Software Libraries”
by Daniel Lemire, Owen Kaser, and Nathan Kurz., Fig. 1.