# Number of primes

• I

## Main Question or Discussion Point

How do computers evaluate the number of primes below a given integer?

jedishrfu
Mentor
fresh_42
Mentor
How do computers evaluate the number of primes below a given integer?
This depends on so many parameters, that it can't be answered, except perhaps by the sieve of Eratosthenes, or simply by $|\pi(x)-\operatorname{Li}(x)|<\dfrac{\sqrt{x}\ln x}{8\pi}$.

The literature has many algorithms as well as estimations for $\pi(x)$. Just search for them.