gr_factor
#include <flint/gr.h>The unit or content c is an element of the same ring as the input: the sign -1, 0 or 1 in \mathbb{Z}, the sign times the content (as a constant polynomial) in \mathbb{Z}[x], the leading coefficient in F[x]. The factors are not sorted in any particular order. flags selects options of the ring's algorithm; 0 gives the default. Implemented for \mathbb{Z}, \mathbb{Q}, multivariate polynomials and rational functions over \mathbb{Z} and \mathbb{Q}, and univariate polynomials (gr_ctx_init_gr_poly, gr_ctx_init_fmpz_poly) over \mathbb{Z}, \mathbb{Z}/p\mathbb{Z}, finite fields, algebraic numbers (qqbar, ca) and complex balls and floating-point numbers, the last ones by root-finding. Other rings return GR_UNABLE.
The FLINT team, “gr_factor (gr.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr/gr_factor.html (generated 2026-10-20).
@misc{flint-doc-gr-gr-factor,
author = {{The FLINT team}},
title = {{gr\_factor (gr.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr/gr_factor.html},
note = {Generated 2026-10-20}
}