nextprime {gmp}
Next Prime Number
Description
Return the next prime number, say p, with p >= n.
Usage
nextprime(n)
Arguments
- n
- Integer
Details
This function uses probabilistic algorithm to identify primes. For practical purposes, it is adequate, the chance of a composite passing will be extremely small.
Values
A (probably) prime number
References
The GNU MP Library, see http://gmplib.org
See Also
isprime and its references and examples.
Examples
Documentation reproduced from package gmp, version 0.5-5. License: GPL
