[][src]Module efron_numbertheory::primes

Structs

Factors

factors represents the prime factors of an integer. the key is the base, and the value is the exponent. we note that since (1<<64-1) < (2<<64) is the max u64, the maximum possible exponent we can store without going into variable-precision arithmetic is 62, so a u8 is fine for the exponent. An assumed invariant is that all exponents are positive.

Primes

Primes represents a subset of the primes, starting with no gaps from the beginning of the positive integers, under a certain maximum. Valid Primes are [], [2, 3, 5], [2, 3, 5, 7, 11], but NOT [2, 5, 11].