ca_factor
#include <flint/ca.h>void ca_factor(ca_factor_t res, const ca_t x, ulong flags, ca_ctx_t ctx)sourceSets res to a factorisation x = b_1^{e_1} \cdots b_n^{e_n} of the number x, which must not be a special value. flags combines one of the polynomial options and one of the integer options below.
A rational number is factored over \mathbb{Z} as selected by the integer option. An element of a field with one algebraic generator is currently returned as a single factor. An element p/q of a generic field \mathbb{Q}(a_1, \ldots, a_n) is factored as a rational function of the generators, that is, as a formal expression: the factors of p and q as polynomials in a_1, \ldots, a_n (with negative exponents for q), followed by the factors of the rational content. This is structural: the bases are not checked to be irreducible as numbers.
The FLINT team, “ca_factor (ca.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ca/ca_factor.html (generated 2026-10-20).
@misc{flint-doc-ca-ca-factor,
author = {{The FLINT team}},
title = {{ca\_factor (ca.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ca/ca_factor.html},
note = {Generated 2026-10-20}
}