FLINT3.7.0-dev

_fmpz_poly_roots_fmpz_squarefree, _fmpz_poly_roots_fmpq_squarefree

Synopsis#include <flint/fmpz_poly.h>
slong _fmpz_poly_roots_fmpz_squarefree(fmpz * res, const fmpz * poly, slong len)source
slong _fmpz_poly_roots_fmpq_squarefree(fmpq * res, const fmpz * poly, slong len)source

Write the integer (respectively rational) roots of (poly, len) to res in no particular order and return their number. The polynomial must be squarefree, with \mathit{len} \ge 1 and a nonzero constant coefficient; res must have room for \mathit{len} - 1 entries.

Cite this page

The FLINT team, “_fmpz_poly_roots_fmpz_squarefree, _fmpz_poly_roots_fmpq_squarefree (fmpz_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_poly/_fmpz_poly_roots_fmpz_squarefree.html (generated 2026-10-20).