uint
uint copied to clipboard
`algorithms/mul_redc`: Create add_mul1 routine.
On 2022-06-09 @recmo wrote in f0f0ddb
“Merge pull request #126 from recmo/redc”:
Create add_mul1 routine.
// Reduce temp.
for i in 0..m.len() {
let u = temp[i].wrapping_mul(inv);
// REFACTOR: Create add_mul1 routine.
let mut carry = 0;
#[allow(clippy::cast_possible_truncation)] // Intentional
for j in 0..m.len() {
carry += u128::from(temp[i + j]) + u128::from(m[j]) * u128::from(u);
temp[i + j] = carry as u64;