_fmpz_poly_num_real_roots, fmpz_poly_num_real_roots
Synopsis
#include <flint/fmpz_poly.h>Degrees up to 4 use closed formulas based on the discriminant. Otherwise Descartes' rule of signs is tried first; it decides the answer when f(x) and f(-x) each have at most one sign variation. Short polynomials with small coefficients use the subresultant Sturm sequence; larger ones first try a primitive Sturm sequence (_fmpz_poly_num_real_roots_sturm_bounded) with a bound that detects coefficient growth, and fall back on the Vincent–Collins–Akritas algorithm.
Cite this page
The FLINT team, “_fmpz_poly_num_real_roots, fmpz_poly_num_real_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_num_real_roots.html (generated 2026-10-20).
@misc{flint-doc-fmpz-poly-fmpz-poly-num-real-roots,
author = {{The FLINT team}},
title = {{\_fmpz\_poly\_num\_real\_roots, fmpz\_poly\_num\_real\_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_num_real_roots.html},
note = {Generated 2026-10-20}
}