Test the primality certificate
This functionality does not run in MATLAB.
numlib::checkPrimalityCertificate tests the certificate of primality returned by numlib::proveprime. For large prime numbers, the numlib::proveprime function generates certificates that provide all data you need for proving primality of a number by the Atkin-Goldwasser-Kilian-Morain algorithm. See Example 1.
For small prime numbers, numlib::proveprime does not return a certificate of primality. Instead, it returns TRUE. For nonprime numbers numlib::proveprime returns FALSE. In both cases, you do not need to use numlib::checkPrimalityCertificate.
Use the numlib::proveprime function to check the primality of the number 1299709. The function returns the following sequence of lists. This sequence is the certificate of primality:
certificate := numlib::proveprime(1299709)
The certificate provides all data that you need for proving primality of 1299709 by the Atkin-Goldwasser-Kilian-Morain algorithm. You can substitute the numbers into the algorithm and verify the primality of the number. Alternatively, you can verify the certificate by using the numlib::checkPrimalityCertificate function:
A list or a sequence of lists returned by numlib::proveprime