Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

primeTester-1.0-py3-none-any.whl (5.1 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