Previous Up Next

6.5.14  Test of primality: is_prime isprime isPrime

The is_prime, isprime and isPrime commands are tests for primality.

isprime and isPrime are the same as is_prime, except they return true or false.


Examples.


You can use the command pari("isprime",n,1) (see Section 6.7.10) to get a primality certificate (see the documentation PARI/GP with the menu HelpManualsPARI-GP) and pari("isprime",n,2) to use the APRCL test.


Examples.


Previous Up Next