Skip to main content

Checks if a number is prime

Project description

prime_test

This module provides the function test(n) that returns True if n is a prime number, and False if it is composite (note that this test is probabilistic so that it can test extremely large numbers very fast for RSA). The function also has an optional variable k (defaults to 40) which is the iterations of the test, more information on that can be found here. Below is an example of how to use the module.

from prime_test import prime
prime.test(167)

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

prime_test-0.2.7.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

prime_test-0.2.7-py3-none-any.whl (2.8 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