Is there a faster implementation of Prime[] available somewhere, already implemented by someone? (Maybe as a compiled routine?)
The default function in Mathematica is slow for large values, and does not work for very large values (greater than 10^12). I need a faster version that also works on very large values.
I'm aware that there are fast implementations of prime counting function (e.g. kimwalisch, c++) that can be then used to estimate and zero in Prime[n] for very large n. But, I'm wondering if this problem was already efficiently solved for Mathematica in the form of a new prime[n] routine?
Primeis based on implementation ofPrimePi), however since the version 12.1 these functions have been updated with possible choice of method. I should have update my question too since limits of the functions have changed. – Artes Jul 01 '21 at 14:32Solve[LogIntegral[x] == 10^12, x]has a fractional error of about $10^{-7}$ compared to the exact answerPrime[10^12]. – Roman Jul 01 '21 at 16:19