math.primes

This module contains utilities relating to prime numbers.

Right now this module mainly has an infinite range of primes backed by a Sieve of Eratosthenes.

More...

Members

Functions

nthPrimeUpperBound
size_t nthPrimeUpperBound(size_t n)

Calculates the upper bound of the integer range containing the nth prime.

Structs

Sieve
struct Sieve(T = size_t)

The Sieve of Eratosthenes

Detailed Description

HELP WELCOMED

The potential number of "prime number utilities" is much, much larger than the relatively small set here, that I've just wanted for some minor benchmarks, but please feel free to submit additional utilities so the namespace can become more useful.

Meta