pub fn count_primes(x: u64) -> u64Expand description
Counts how many prime numbers are there less than or equal to x
This function is an abstraction for generating prime numbers up to x, then calling the count primes method.
If you only need an approximation, see estimates.
ยงExamples
use prime_data::count_primes;
assert_eq!(count_primes(1_000), 168);
assert_eq!(count_primes(100_000), 9592);