There are 3 functions provided: primeq, bigprimeq and nextPrime.
Primality test of an integer is a common tasks in number theory. primeq is a rigorous primality test function. It takes an integer argument n.
Returned value will be a boolean, true or false.
Note that this test may time-out.
Sometimes, it is sufficient to know probable primality of a number. A probable primality test can be much faster than rigorous one. bigprimeq is essentially a Miller-Rabin test function. It takes an integer argument n.
Returned value will be a boolean, true or false. The error probability for false positive is less than 4-20.
What is the smallest prime more than 1 million? Such a question can be answered by nextPrime. It takes an integer argument n.
Returned value will be the smallest prime strictly bigger than the given n. Note that this test may time-out as primeq.