isPseudoprime x
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.
|
|
|
|
|
These functions handle numbers larger than this. For example,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|