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)
Built Distribution
Close
Hashes for prime_test-0.2.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1accc231f5653ca7c70bd77c0e7b7adc84856ac616003ae0572ef4df48857d4 |
|
MD5 | 34a4bc4fe0fb112a41e83245055fc958 |
|
BLAKE2b-256 | b377ef8fc216f3ad41a384acec56d380b0b155b78b56d03caf0bc1934195e467 |