fmpz_mod_poly_is_irreducible_rabin_f
#include <flint/fmpz_mod_poly_factor.h>int fmpz_mod_poly_is_irreducible_rabin_f(fmpz_t fac, const fmpz_mod_poly_t f, const fmpz_mod_ctx_t ctx)sourceRabin's irreducibility test for a possibly composite modulus n: either sets fac to 1 and returns whether f is irreducible (when n is prime), or sets fac to a nontrivial factor of n, met as a non-invertible leading coefficient, and returns an unspecified value.
The powers x^{n^e} \bmod f are computed from a table of the powers x^{n^{2^i}} (fmpz_mod_poly_frobenius_powers_2exp_precomp). For f of length at most 2 the function sets fac to 1 and returns 1. The gcds are computed with fmpz_mod_poly_gcd, which can raise an exception for a composite modulus.
The FLINT team, “fmpz_mod_poly_is_irreducible_rabin_f (fmpz_mod_poly_factor.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mod_poly_factor/fmpz_mod_poly_is_irreducible_rabin_f.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mod-poly-factor-fmpz-mod-poly-is-irreducible-rabin-f,
author = {{The FLINT team}},
title = {{fmpz\_mod\_poly\_is\_irreducible\_rabin\_f (fmpz\_mod\_poly\_factor.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mod_poly_factor/fmpz_mod_poly_is_irreducible_rabin_f.html},
note = {Generated 2026-10-20}
}