FLINT3.7.0-dev

_qqbar_roots_poly_squarefree

Synopsis#include <flint/qqbar.h>
int _qqbar_roots_poly_squarefree(qqbar_ptr roots, qqbar_srcptr coeffs, slong len, slong deg_limit, slong bits_limit)source

Sets roots to the d=len−1d = \mathit{len} - 1 roots of the squarefree polynomial f=a0+⋯+adxdf = a_0 + \cdots + a_d x^d with algebraic coefficients coeffs (ad≠0a_d \ne 0), and returns 1; returns 0 if a limit is exceeded.

An annihilating polynomial with rational coefficients is the product g=∏(a~0+a~1x+⋯+a~dxd)g = \prod (\tilde a_0 + \tilde a_1 x + \cdots + \tilde a_d x^d) over all combinations of conjugates a~k\tilde a_k of the coefficients. It is computed numerically, as a product of polynomials with ball coefficients by binary splitting, and multiplied by a power of the common denominator of the coefficients so that its coefficients are integers that can be read off once the precision is high enough. Then gg is factored and the factors are matched against the numerical roots of ff. Since gg can be huge, the computation is aborted when its degree (the number of conjugate combinations) or size exceeds deg_limit or bits_limit (nonpositive values remove the limits, but the function can still fail if gg exceeds machine size). For polynomials that may have repeated roots, use gr_poly_roots with a qqbar context, which performs a squarefree factorisation first; gr_poly_roots_other computes algebraic roots of polynomials over other rings.

Cite this page

The FLINT team, “_qqbar_roots_poly_squarefree (qqbar.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/qqbar/_qqbar_roots_poly_squarefree.html (generated 2026-11-02).