Documentation
¶
Index ¶
Constants ¶
View Source
const (
// MaxPrime is the highest value up to which we will search for primes
MaxPrime = 100*1000*1000 + 1000
)
Variables ¶
View Source
var ( // PackedPrimes is a list of the first n prime numbers PackedPrimes []int // PackedPrimesEnd is the index of the final value in the PackedPrimes slice PackedPrimesEnd int )
Functions ¶
func GeneratePrimesGob ¶ added in v0.0.10
func GeneratePrimesGob()
GeneratePrimesGob finds, packs, and saves primes to a GOB file
func PackedIndex ¶
PackedIndex returns the index in PackedPrimes of n, or -1 if not found
func Pi ¶
Pi is the prime counting function, returning the number of primes below n https://en.wikipedia.org/wiki/Prime-counting_function
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.