Skip to main content

radix_large_divisor

Function radix_large_divisor 

Source
const fn radix_large_divisor<const LIMBS: usize>(
    radix: u32,
    div_limb: NonZero<Limb>,
    digits_limb: usize,
) -> ([Limb; LIMBS], usize, u32)
Expand description

Compute the maximum radix divisor for a number of limbs. Returns a pair of the large divisor value and the number of digits, such that divisor = radix ** digits. The value div_limb is the largest power of radix that can fit within a limb.