Generate and test for prime numbers.
Project description
Compare a variety of algorithms for generating and testing prime numbers with the pure-Python module pyprimes.
Prime numbers are those positive integers which are not divisible exactly by any number other than itself or one. Generating primes and testing for primality has been a favourite mathematical pastime for centuries, as well as of great practical importance for encrypting data.
Features of pyprimes:
Produce prime numbers lazily, on demand.
Effective, fast algorithms including Sieve of Eratosthenes, Croft Spiral, and Wheel Factorisation.
Test whether numbers are prime efficiently.
Deterministic and probabilistic primality tests.
Examples of what not to do provided, including trial division, Turner’s algorithm, and primality testing using a regular expression.
Factorise numbers into the product of prime factors.
Suitable for Python 2.5 through 3.2 from one code base.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyprimes-0.1.1a.tar.gz
.
File metadata
- Download URL: pyprimes-0.1.1a.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30e7ea38d1f98b5d5f6e63660213c4670169a824490183af82b584134648870d |
|
MD5 | 212824cab8d011d02ca72a66d468fa23 |
|
BLAKE2b-256 | 6d8c9ebd5abd9945cbd9a2d934f42c43ac0e4dfebcd3dd8ea184cea2bf8520a8 |
Provenance
File details
Details for the file pyprimes-0.1.1a.linux-i686.exe
.
File metadata
- Download URL: pyprimes-0.1.1a.linux-i686.exe
- Upload date:
- Size: 75.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a86dc3b6f52a192738385f89397cd149039beb18bcf82e78b74b6c2938922ab |
|
MD5 | d0476f4c32d862d6cf5327bd23047507 |
|
BLAKE2b-256 | 795b9fe4b643d91771bb65782afdd592188382b4cddf32dabbe61d0120d464fe |