gr_poly_factor_equal_deg, _gr_poly_factor_equal_deg_with_frob
#include <flint/gr_poly.h>int gr_poly_factor_equal_deg(gr_poly_vec_t fac, const gr_poly_t pol, slong d, gr_ctx_t ctx)sourceint _gr_poly_factor_equal_deg_with_frob(gr_poly_vec_t fac, const gr_poly_t f, slong d, const gr_poly_t frob, flint_rand_t state, gr_ctx_t ctx)sourceEqual-degree factorisation: for a squarefree whose irreducible factors all have degree , set fac to the monic irreducible factors. The result is undefined for other inputs.
This is the Cantor-Zassenhaus algorithm [CanZas1981] in the trace form of von zur Gathen and Shoup [GatSho1992]: for random , the trace (computed by modular composition with the Frobenius , by exponentiation, or by a doubling scheme, depending on and ) lies in the Berlekamp subalgebra, and for odd , or for , splits with probability about . The splitting is repeated on the factors. For (root finding) is a random linear polynomial, which makes the exponentiation cheaper. When several pieces remain and threads are available over a thread-safe ring, the pieces are split in parallel, each with its own random state. The underscore version assumes monic, takes as frob (unused for ) and a random state, and appends to fac.
References#
- [CanZas1981] D. G. Cantor and H. Zassenhaus. A new algorithm for factoring polynomials over finite fields. Mathematics of Computation 36 (1981), 587–592. https://doi.org/10.1090/S0025-5718-1981-0606517-5
- [GatSho1992] J. von zur Gathen and V. Shoup, "Computing Frobenius maps and factoring polynomials", Computational Complexity 2 (1992), 187-224. https://doi.org/10.1007/BF01272074
The FLINT team, “gr_poly_factor_equal_deg, _gr_poly_factor_equal_deg_with_frob (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/gr_poly_factor_equal_deg.html (generated 2026-11-02).
@misc{flint-doc-gr-poly-gr-poly-factor-equal-deg,
author = {{The FLINT team}},
title = {{gr\_poly\_factor\_equal\_deg, \_gr\_poly\_factor\_equal\_deg\_with\_frob (gr\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_poly/gr_poly_factor_equal_deg.html},
note = {Generated 2026-11-02}
}