fn div_rem_1e16(n: u128) -> (u128, u64)
Expand description
Euclidean division plus remainder with constant 1E16 basically consumes 16 decimals from n.
The 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