Difference between revisions of "CoCoA:NextPrime"
From ApCoCoAWiki
(pushing XML rev. 1.46, again) |
(No difference)
|
Latest revision as of 10:02, 24 October 2007
NextPrime
find the next largest prime number
Description
This function computes the smallest prime number greater than N. If
N is negative or too large then the value zero is returned. This
function may generate primes larger than permitted as the characteristic of a finite field in CoCoA. On most platforms primes up to about 45000 can be generated; in some cases a higher limit exists.
Example
NextPrime(1000); 1009 -------------------------------
Syntax
NextPrime(N:INT):INT
<type>integer</type>