Find prime numbers
Project description
Pseudoprimes
Test and find prime numbers.
import pseudoprimes
pseudoprimes.is_prime(11)
>> True
pseudoprimes.next_prime(3)
>> 5
pseudoprimes.prev_prime(100)
>> 97
Installation
pip install pseudoprimes
Probabilistic or deterministic?
The used Miller–Rabin algorithm is deterministic for values until 3317044064679887385961981. Numbers larger than that are tested using a probabilistic primality test.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pseudoprimes-2022.4.27.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bf863f04f06a71ce460823474e6cfd0d8159c1e94f4f48d9ff66aea2100d422 |
|
MD5 | d0958e927f705e72ea951510231cd656 |
|
BLAKE2b-256 | 20b26df79bc011059878d714ef33376e66078f00d5d7eaa6e4b5ef10a7d689ce |
Close
Hashes for pseudoprimes-2022.4.27.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db5b1d9b151ab9240996f0f202257f3731d0ba215e6c87b4ad9a0c325665bd8e |
|
MD5 | a85a51eda20ce48834fef6a46c3f42ca |
|
BLAKE2b-256 | 784ea7695fef38a03c2bdafac5750013bcb63e3285c0dfd0490e838031db3a08 |