Function lexical_util::div128::pow2_u128_divrem
source · [−]Expand description
Calculate a div/remainder algorithm optimized for power-of-two radixes.
This is trivial: the number of digits we process is 64 / log2(radix).
Therefore, the shr is log2(radix) * digits, and the mask is just the
lower shr bits of the digits.