aprcl_is_prime_gauss, aprcl_is_prime_gauss_min_R
Synopsis
#include <flint/aprcl.h>Return 1 if n is prime and 0 otherwise, using the Gauss sum test in the form described by Schoof [Sch2008], with the minimum value R respectively 180. If the conditions (\mathcal L_p) cannot be verified, aprcl_is_prime_gauss retries with R multiplied by 2, 3 and 5 before throwing an exception. This version is much slower than the Jacobi sum test.
References#
- [Sch2008] R. Schoof. Four primality testing algorithms. In: J. P. Buhler and P. Stevenhagen (eds.), Algorithmic Number Theory, MSRI Publications 44, Cambridge University Press, 2008, 101–126.
Cite this page
The FLINT team, “aprcl_is_prime_gauss, aprcl_is_prime_gauss_min_R (aprcl.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/aprcl/aprcl_is_prime_gauss.html (generated 2026-10-20).
@misc{flint-doc-aprcl-aprcl-is-prime-gauss,
author = {{The FLINT team}},
title = {{aprcl\_is\_prime\_gauss, aprcl\_is\_prime\_gauss\_min\_R (aprcl.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/aprcl/aprcl_is_prime_gauss.html},
note = {Generated 2026-10-20}
}