9 stable releases
1.1.1 | May 25, 2022 |
---|---|
1.1.0 | Mar 13, 2022 |
1.0.6 | Mar 1, 2020 |
1.0.4 | Jan 30, 2020 |
1.0.3 | Jan 26, 2020 |
#1203 in Math
154 downloads per month
Used in 5 crates
(3 directly)
8KB
142 lines
miller_rabin
Multi-threaded, arbitrary precision implementation of the Miller-Rabin primality test
lib.rs
:
Quick Start
Contained within this module are two functions:
is_witness
is_prime
The function is_witness
performs a single iteration of the Miller-Rabin
primality test.
On the other hand, is_prime
is a routine that performs the Miller-Rabin
primality test a given number of times in parallel, exiting as soon as the iterator
encounters a witness for the compositeness of the tested integer.
Dependencies
~2MB
~41K SLoC