up previous next
find the next largest prime number
This function computes the smallest prime number greater than N. If
N is negative or too large then an error is signalled. The upper
limit depends on the computer you are using; it is probably
2^31
or
2^63.
/**/ NextPrime(1000);
1009
|