Skip to main content

A python module that aims to fleetly determine whether a small positive integer is a prime number.

Project description

Prime number calculator

Installation

pip install prime-number-calculator

Examples

number=int(input())

from prime_number import prime_number
print(prime_number(number))

from prime_number import submultiple
print(submultiple(number))

from prime_number import prime_factorization
print(prime_factorization(number))

Introduction

This algorithm is much faster for positive integers less than 1016 comparing with the classical ones such as:

def isPrime(N):
    if N%2==0 and N-2:
        return False
    else:
        for n in range(3,int(N**0.5)+1,2):
            if N%n==0:
                return False
        return True

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_number_calculator-0.1.0.tar.gz (14.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prime_number_calculator-0.1.0-py3-none-any.whl (14.8 MB view details)

Uploaded Python 3

File details

Details for the file prime_number_calculator-0.1.0.tar.gz.

File metadata

  • Download URL: prime_number_calculator-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for prime_number_calculator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 26911c83d843f7f92a57efd1c0efbf70ceef10c77dd6ab7cc6ad6089ca0c7f3c
MD5 ac92b9c967590be5821ae3740d31639d
BLAKE2b-256 c7f3d19f6258c3fe2fc14cc6bc4e5525fff1c7f9ba31aca363c6143cc479d6ef

See more details on using hashes here.

File details

Details for the file prime_number_calculator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: prime_number_calculator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for prime_number_calculator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c31de7820e9a8be0644f15a3eb5e3a64d424f305c7ed0686c4ce68a61cbd930d
MD5 dc4b98740e9a3958d043a575fd6de15c
BLAKE2b-256 18360ad0a279e4a3eb21804ce6a84cfb7d56e8f1848bdd8bbad396adc231beef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page