fmpz_is_probabprime
Synopsis
#include <flint/fmpz.h>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).
@misc{flint-doc-fmpz-fmpz-is-probabprime,
author = {{The FLINT team}},
title = {{fmpz\_is\_probabprime (fmpz.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz/fmpz_is_probabprime.html},
note = {Generated 2026-10-20}
}