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

next_prime() doesn't actually return the next prime (it can skip some) #50

Closed
darconeous opened this issue Jun 16, 2023 · 1 comment · Fixed by #53
Closed

next_prime() doesn't actually return the next prime (it can skip some) #50

darconeous opened this issue Jun 16, 2023 · 1 comment · Fixed by #53

Comments

@darconeous
Copy link

Not sure if this is intended behavior, but I noticed that next_prime() seems to skip over some primes; it doesn't always pick the next prime.

As an example, if I give it the number 1032989, the next prime is actually 1033001. However, next_prime() ends up returning 1033027.

Again, not sure if this is intended behavior, but if this is the intended behavior then it should likely be called out in the documentation for the method.

Maybe this is due to #44?

@darconeous
Copy link
Author

Yep, I can confirm that fixing #44 appears to fix this problem.

dignifiedquire added a commit that referenced this issue Jun 27, 2023
Based on the example in #50

Fixes #50
dignifiedquire added a commit that referenced this issue Jun 27, 2023
Based on the example in #50

Fixes #50
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 a pull request may close this issue.

1 participant