Closed saahil-mahato closed 1 month ago
Attention: Patch coverage is 96.00000%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 95.36%. Comparing base (
bc8d6fa
) to head (dfcdea6
). Report is 8 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
src/math/fermats_little_theorem.rs | 96.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@vil02 I have resolved the comments. Please review and let me know if anything is missing.
Description
Fermat Primality Test Implementation
This PR introduces an implementation of the Fermat Primality Test in Rust. The algorithm leverages Fermat's Little Theorem, which states that if ( p ) is a prime number, then for any integer ( a ) such that ( 1 < a < p - 1 ), it holds that:
a^(p−1) ≡ 1 (mod p)
Key Features:
k
tests) with randomly selected bases to increase the reliability of the primality check.Test Cases:
This implementation provides a fast, probabilistic approach to primality testing, making it suitable for applications in cryptography and numerical analysis.
Type of change
Please delete options that are not relevant.
Checklist:
cargo clippy --all -- -D warnings
just before my last commit and fixed any issue that was found.cargo fmt
just before my last commit.cargo test
just before my last commit and all tests passed.mod.rs
file within its own folder, and in any parent folder(s).DIRECTORY.md
with the correct link.COUNTRIBUTING.md
and my code follows its guidelines.