uint icon indicating copy to clipboard operation
uint copied to clipboard

`algorithms/mul_redc`: Create add_mul1 routine.

Open github-actions[bot] opened this issue 2 years ago • 0 comments

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;

From src/algorithms/mul_redc.rs:21

github-actions[bot] avatar Jun 09 '22 05:06 github-actions[bot]