FLINT3.7.0-dev

_fmpz_poly_is_squarefree, fmpz_poly_is_squarefree

Synopsis#include <flint/fmpz_poly.h>
int _fmpz_poly_is_squarefree(const fmpz * poly, slong len)source
int fmpz_poly_is_squarefree(const fmpz_poly_t poly)source

Return whether the polynomial has no repeated factor of positive degree, that is, whether it is squarefree in \mathbb{Q}[x]; the content is ignored, so 4x + 4 counts as squarefree. Polynomials of length at most 2 are squarefree, including zero; quadratics are tested with the discriminant, and longer polynomials by checking that \gcd(f, f') is constant.

Cite this page

The FLINT team, “_fmpz_poly_is_squarefree, fmpz_poly_is_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_is_squarefree.html (generated 2026-10-20).