Function itoa::udiv128::udivmod_1e19

source ·
pub fn udivmod_1e19(n: u128) -> (u128, u64)
Expand description

Divide n by 1e19 and return quotient and remainder

Integer division algorithm is based on the following paper:

T. Granlund and P. Montgomery, “Division by Invariant Integers Using Multiplication” in Proc. of the SIGPLAN94 Conference on Programming Language Design and Implementation, 1994, pp. 61–72