MCPcopy Create free account
hub / github.com/andeya/algorithm / NextPrime

Function NextPrime

mathutil/primes.go:174–215  ·  view source on GitHub ↗

NextPrime returns first prime > n and true if successful or an undefined value and false if there is no next prime in the uint32 limits. Typical run time is about 2 µs. TODO rename to NextPrimeUint32

(n uint32)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 8

PrimorialProductsUint32Function · 0.85
NewFC32Function · 0.85
NewFCBigFunction · 0.85
BenchmarkNextPrimeFunction · 0.85
TestNextPrimeFunction · 0.85
TestNextPrime2Function · 0.85
TestFactorIntBFunction · 0.85
TestNextPrimeUint16Function · 0.85

Calls 2

NextPrimeUint16Function · 0.85
IsPrimeFunction · 0.85

Tested by 5

BenchmarkNextPrimeFunction · 0.68
TestNextPrimeFunction · 0.68
TestNextPrime2Function · 0.68
TestFactorIntBFunction · 0.68
TestNextPrimeUint16Function · 0.68