fmpz_poly_isolate_real_roots, fmpz_poly_isolate_positive_roots
#include <flint/fmpz_poly.h>void fmpz_poly_isolate_real_roots(fmpq * exact_roots, slong * n_exact, fmpz * c_array, slong * k_array, slong * n_interval, const fmpz_poly_t pol)sourcevoid fmpz_poly_isolate_positive_roots(fmpq * exact_roots, slong * n_exact, fmpz * c_array, slong * k_array, slong * n_interval, const fmpz_poly_t pol)sourceIsolate the real (respectively strictly positive) roots of the squarefree polynomial pol. Exact dyadic roots are written to exact_roots and counted in *n_exact; the other roots are enclosed in disjoint open intervals (c\,2^k, (c + 1) 2^k) with c = c_array[i] and k = k_array[i], counted in *n_interval. The arrays must have room for \deg(\mathit{pol}) entries.
Three algorithms are used. For polynomials of large degree, bisection with a Sturm sequence is tried first; the sequence is computed as a primitive remainder sequence and evaluated at each bisection point in O(n) operations using the pseudo-quotients. This is much faster than VCA when the Sturm sequence has small coefficients and there are many real roots (classical orthogonal polynomials) or clusters of close roots (sparse polynomials). Otherwise, if the polynomial appears to have only real roots (Newton's inequalities hold and the numbers of sign variations of f(x) and f(-x) add up to the degree) spread over many orders of magnitude, as for Eulerian polynomials, sign changes are located by evaluating at dyadic points in ball arithmetic, and the result is certified by checking that the number of sign changes equals the number of sign variations. This avoids the huge coefficients that VCA produces for such polynomials. If these methods do not apply or fail, the Vincent–Collins–Akritas algorithm is used.
The FLINT team, “fmpz_poly_isolate_real_roots, fmpz_poly_isolate_positive_roots (fmpz_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_poly/fmpz_poly_isolate_real_roots.html (generated 2026-10-20).
@misc{flint-doc-fmpz-poly-fmpz-poly-isolate-real-roots,
author = {{The FLINT team}},
title = {{fmpz\_poly\_isolate\_real\_roots, fmpz\_poly\_isolate\_positive\_roots (fmpz\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_poly/fmpz_poly_isolate_real_roots.html},
note = {Generated 2026-10-20}
}