uint
uint copied to clipboard
`algorithms/mul_redc`: Do combined multiplication and reduction.
On 2022-06-09 @recmo wrote in f0f0ddb
“Merge pull request #126 from recmo/redc”:
Do combined multiplication and reduction.
debug_assert_eq!(b.len(), m.len());
debug_assert_eq!(result.len(), m.len());
debug_assert_eq!(inv.wrapping_mul(m[0]), u64::MAX);
// Compute temp full product.
// OPT: Do combined multiplication and reduction.
let mut temp = vec![0; 2 * m.len() + 1];
mul(a, b, &mut temp);
// Reduce temp.
for i in 0..m.len() {