FLINT3.7.0-dev

fmpz_mod_poly_is_irreducible_rabin_f

Synopsis#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)source

Rabin'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.

Cite this page

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).