FLINT3.7.0-dev

n_is_strong_probabprime2_preinv, n_is_strong_probabprime_precomp

Synopsis#include <flint/ulong_extras.h>
int n_is_strong_probabprime2_preinv(ulong n, ulong ninv, ulong a, ulong d)source
int n_is_strong_probabprime_precomp(ulong n, double npre, ulong a, ulong d)source

Test whether odd n is a strong probable prime to base a [Mil1976; Rab1980], given the odd part d of n - 1 and 0 < a < n. The _precomp version requires n < 2^{53}. See Strong probable prime test.

References#

  • [Mil1976] G. L. Miller, "Riemann's hypothesis and tests for primality", Journal of Computer and System Sciences 13 (1976), 300–317
  • [Rab1980] M. O. Rabin, "Probabilistic algorithm for testing primality", Journal of Number Theory 12 (1980), 128–138
Cite this page

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