prime_data/data/estimate/
mod.rs

1//! # Prime Estimates
2//! 
3//! This module is dedicated for estimating prime bounds
4
5use super::PrimeData;
6
7pub use upper_bound::upper_bound;
8mod upper_bound;
9
10pub use nth_prime::{nth_prime_approximation, nth_prime_bounds};
11mod nth_prime;
12
13/// Evaluates the exact amount of prime numbers from 1 to N
14/// 
15/// This is exactly the same as creating some [PrimeData](crate::data::PrimeData) ranging from
16/// 1 to N and [counting its primes](crate::data::PrimeData::count_primes)
17pub fn exact_count(bound: u64) -> u64 {
18    PrimeData::generate(0..=bound).count_primes()
19}