A collection of Python modules consisting different primality tests.
Project description
PrimeTester
Prime-Tests is a collection of Python modules consisting different primality tests.
Tests Included
- Fermat Test
- Miller Rabin Test
- Solovay Strassen
- AKS Test
- Trial Division
Install
pip3 install PrimeTester
Usage
Import the test function from the python modules installed.
from aks import aks
For probability based tests (Fermat, Miller Rabin, Solovay Strassen) those functions take in two arguments. The first argument takes in a number to be tested as prime, the second is the number of test iterations.
print(fermat(5,100))
All the test functions will return a true or false value. A returned true value indicates that the inputted number is a prime. A returned false value indicates that the inputted number is not a prime.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for primeTester-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f6f3db6cc915a7ffef66d2ca212ee3ca3ea17913b38e2b7aa35ecbac35aaaa4 |
|
MD5 | c946ce55b6004e9dd53e9c2d3ae52114 |
|
BLAKE2b-256 | 41ab49733a29b2c74a26753757b7b0f79482f4539ba40ab4a3e5e5bd6082b947 |