Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved nth Prime #142

Merged
merged 22 commits into from
Jan 8, 2024
Merged

Improved nth Prime #142

merged 22 commits into from
Jan 8, 2024

Conversation

kimwalisch
Copy link
Owner

The new algorithm uses the inverse Riemann R function to accurately approximate the nth prime. It then counts the primes up to this approximate nth prime using multi-threading. Afterwards our new code uses a primesieve::iterator (single-threaded) for the remaining distance (< sqrt(n)).

@kimwalisch kimwalisch self-assigned this Jan 8, 2024
@kimwalisch kimwalisch merged commit c0ec864 into master Jan 8, 2024
22 checks passed
@kimwalisch kimwalisch deleted the nthPrimeApprox branch January 8, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant