FLINT3.7.0-dev

fmpz_is_probabprime_BPSW

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

Returns 1 if n passes the Baillie–PSW test [PSW1980] (a strong probable prime test to base 2 and a Lucas test), and 0 otherwise. No composite passing it is known, and no prime fails it.

References#

  • [PSW1980] C. Pomerance, J. L. Selfridge and S. S. Wagstaff, Jr., "The pseudoprimes to 25·10^9", Mathematics of Computation 35 (1980), 1003–1026
Cite this page

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