2 ms·
No. We can compute the number exactly without computing all primes below a trillion (that’s why this article can mention the exact answer). See https://en.wikip
by Someone 6y ago
No. We can compute the number exactly without computing all primes below a trillion (that’s why this article can mention the exact answer). See https://en.wikipedia.org/wiki/Prime-counting_function#Algorithms_for_evaluating_π(x) https://en.wikipedia.org/wiki/Prime-counting_function#Algori...
For those working on a language that supports automatic differentiation: implement such an algorithm, and differentiate it to get a primality test. I think that would be a good test for your compiler.