n_ll_is_prime
Synopsis
#include <flint/ulong_extras.h>For n up to about 81 bits, trial division is followed by a strong probable prime test with the first 13 primes as bases, which proves primality in this range [SorWeb2016]. For larger n, trial division and a base-2 test are done and the function returns 0 or -1; use fmpz_is_prime for a proof. On 32-bit machines the function currently always returns -1.
References#
- [SorWeb2016] Sorenson, Jonathan and Webster, Jonathan : Strong pseudoprimes to twelve prime bases. Math. Comp. 86 (2017), 985-1003, https://doi.org/10.1090/mcom/3134
Cite this page
The FLINT team, “n_ll_is_prime (ulong_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ulong_extras/n_ll_is_prime.html (generated 2026-10-20).
@misc{flint-doc-ulong-extras-n-ll-is-prime,
author = {{The FLINT team}},
title = {{n\_ll\_is\_prime (ulong\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ulong_extras/n_ll_is_prime.html},
note = {Generated 2026-10-20}
}