FLINT3.7.0-dev

_fmpz_poly_sqrt, fmpz_poly_sqrt

Synopsis#include <flint/fmpz_poly.h>
int _fmpz_poly_sqrt(fmpz * res, const fmpz * poly, slong len)source
int fmpz_poly_sqrt(fmpz_poly_t b, const fmpz_poly_t a)source

If a is the square of a polynomial in \mathbb{Z}[x], set b to the square root with positive leading coefficient and return 1; otherwise return 0. The heuristic _fmpz_poly_sqrt_KS is tried first, and the divide-and-conquer algorithm is used if it fails. The underscore version writes len / 2 + 1 coefficients.

Cite this page

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