FLINT3.7.0-dev

fmpz_is_probabprime

Synopsis#include <flint/fmpz.h>
int fmpz_is_probabprime(const fmpz_t p)source

Returns 0 if p is composite and 1 if it is a probable prime. For p up to about 81 bits on 64-bit machines (where n_is_prime and n_ll_is_prime decide primality), the answer is exact; otherwise the test is trial division, a perfect square check and the Baillie–PSW test (a base-2 strong probable prime test and a Lucas test), for which no composite that passes is known.

Cite this page

The FLINT team, “fmpz_is_probabprime (fmpz.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz/fmpz_is_probabprime.html (generated 2026-10-20).