Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pseudoprimes-2022.4.27.dev0.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

pseudoprimes-2022.4.27.dev0-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page