Skip to main content

primeTester

primeTester is a collection of Python modules consisting different primality tests.

Link to package on PyPI: primeTester.

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. Camel case is used for the functions names.

from millerRabin import millerRabin

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.

Metadata

Release files for primeTester 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for primeTester 1.1
File Size Uploaded
primeTester-1.1.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for primeTester 1.1
File Interpreter ABI Platform
primeTester-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / primeTester-1.1.tar.gz

Download URL primeTester-1.1.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
02ffcbc085b6c473e88d2fca061536ca197cea0aa61882ee9bcbf9012e538a8e
BLAKE2b-256 checksum
How to use checksums
538bbc2ff4874015b18ae158a9ba5b39e9154ec937a13352c505d069ee040f1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9

Release files / primeTester-1.1-py3-none-any.whl

Download URL primeTester-1.1-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be7fa0f1c633ecd72ddada11cb5ec668c3110fe8392216fea9d63f7333d93539
BLAKE2b-256 checksum
How to use checksums
b4865eccd9ad32eb0dcd894c94c8d068c96961237f82e570ac255cc87d4507a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files

1.0

1 release file

0.1

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page