Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

algorithms/mul_redc: Create add_mul1 routine. #133

Closed
github-actions bot opened this issue Jun 9, 2022 · 0 comments
Closed

algorithms/mul_redc: Create add_mul1 routine. #133

github-actions bot opened this issue Jun 9, 2022 · 0 comments
Assignees
Labels
refactor Can be written more cleanly tracker Issue tracked by bot

Comments

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

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 github-actions bot added refactor Can be written more cleanly tracker Issue tracked by bot labels Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Can be written more cleanly tracker Issue tracked by bot
Projects
None yet
Development

No branches or pull requests

1 participant