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

modular: a^b)^c = a^(b * c). Which requires carmichael fn. #108

Open
github-actions bot opened this issue Jun 3, 2022 · 0 comments
Open

modular: a^b)^c = a^(b * c). Which requires carmichael fn. #108

github-actions bot opened this issue Jun 3, 2022 · 0 comments
Assignees
Labels
to do To be done tracker Issue tracked by bot

Comments

@github-actions
Copy link

github-actions bot commented Jun 3, 2022

On 2022-06-03 @recmo wrote in 2f6a5d6 “Merge pull request #103 from recmo/mulmod”:

a^b)^c = a^(b * c). Which requires carmichael fn.

            // TODO: Increase cases when perf is better.
            let mut config = Config::default();
            config.cases = min(config.cases, if BITS > 500 { 3 } else { 10 });
            proptest!(config, |(a: U, b: U, c: U, m: U)| {
                // TODO: a^(b+c) = a^b * a^c. Which requires carmichael fn.
                // TODO: (a^b)^c = a^(b * c). Which requires carmichael fn.
                assert_eq!(a.mul_mod(b, m).pow_mod(c, m), a.pow_mod(c, m).mul_mod(b.pow_mod(c, m), m));
            });
        });
    }
}

From src/modular.rs:182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to do To be done tracker Issue tracked by bot
Projects
None yet
Development

No branches or pull requests

1 participant