M2 icon indicating copy to clipboard operation
M2 copied to clipboard

flint pseudoprimality test documentation

Open DanGrayson opened this issue 4 years ago • 0 comments

It would be good to state what version of flint we are currently using and what algorithm is used here by it:

i9 : help isPseudoprime

o9 = isPseudoprime -- whether an integer is probably prime
     *****************************************************

     Synopsis
     ========

       * Usage: 
             isPseudoprime x
       * Inputs:
           * x, an integer, 
       * Outputs:
           * a Boolean value, 

     Description
     ===========

     Performs some trial division and then some probabilistic primality tests. If $x$ is
     definitely composite, the function returns false, otherwise it is declared probably prime,
     i.e. prime for most practical purposes, and the function returns true. The chance of
     declaring a composite number prime is very small. Subsequent calls to the same function do
     not increase the probability of the number being prime.  In fact, there are no known numbers
     which are composite, and for which this function returns true, although it is expected that
     there are an infinite number of such primes.

     This function calls a function in the "FLINT" library.

DanGrayson avatar Sep 21 '21 15:09 DanGrayson