FLINT3.7.0-dev

_fq_poly_sqrt, fq_poly_sqrt

Synopsis#include <flint/fq_poly.h>
int _fq_poly_sqrt(fq_struct * s, const fq_struct * p, slong len, fq_ctx_t ctx)
int fq_poly_sqrt(fq_poly_t b, const fq_poly_t a, fq_ctx_t ctx)

If the polynomial is the square of a polynomial, set the output to a square root and return 1; otherwise return 0. The underscore version writes len / 2 + 1 coefficients.

In characteristic 2 a square is a polynomial in x^2, whose square root is computed coefficientwise with fq_sqrt. Otherwise the valuation must be even, the constant term must be a square in \mathbb{F}_q, and the candidate square root is computed as a power series square root of length len / 2 + 1 and checked by squaring its high part.

Cite this page

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