We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
nextPrime x First prime after x
> require('number-crunch').nextPrime(3) [ 3 ]
I expect nextPrime(3) to return 5.
nextPrime(3)
The text was updated successfully, but these errors were encountered:
At the moment nextPrime returns the input if it is prime. It was designed that way, but the naming is not appropriate for its purpose.
There will be a fix for nextPrime, and possibly a new function findPrime to replicate the current behavior.
Sorry, something went wrong.
Issue #4: nextPrime should return prime > input, even if input is prime
262d720
Fixed in version 1.0.5.
vukicevic
No branches or pull requests
I expect
nextPrime(3)
to return 5.The text was updated successfully, but these errors were encountered: