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. Intall using pip install prime_test
from prime_test import prime
print(prime.test(167))
# prints True
(And I made in four other languages just becasue why not)