FLINT3.7.0-dev

_fmpz_poly_sqrt_classical, fmpz_poly_sqrt_classical, _fmpz_poly_sqrt_divconquer, fmpz_poly_sqrt_divconquer

Synopsis#include <flint/fmpz_poly.h>
int _fmpz_poly_sqrt_classical(fmpz * res, const fmpz * poly, slong len, int exact)source
int fmpz_poly_sqrt_classical(fmpz_poly_t b, const fmpz_poly_t a)source
int _fmpz_poly_sqrt_divconquer(fmpz * res, const fmpz * poly, slong len, int exact)source
int fmpz_poly_sqrt_divconquer(fmpz_poly_t b, const fmpz_poly_t a)source

Square root with the conventions of fmpz_poly_sqrt, computed from the top coefficient down, by the classical O(n^2) algorithm, respectively by divide and conquer. Most non-squares are detected early by cheap tests: the length must be odd, the valuation even, the leading and constant coefficients squares, and certain coefficients even (the square root must exist modulo 2). If exact is 0, the underscore versions only compute the top half of the root and allow a remainder, which is not computed.

Cite this page

The FLINT team, “_fmpz_poly_sqrt_classical, fmpz_poly_sqrt_classical, _fmpz_poly_sqrt_divconquer, fmpz_poly_sqrt_divconquer (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_classical.html (generated 2026-10-20).