FLINT3.7.0-dev

flint_mpn_is_square

Synopsis#include <flint/mpn_extras.h>
int flint_mpn_is_square(mp_srcptr a, mp_size_t an)source

Returns 1 if (a, \mathit{an}) is a perfect square and 0 otherwise, using the screening of flint_mpn_sqrt and allocating space for the root only when the screening passes. Requires a_{an-1} \ne 0. Used by fmpz_is_square.

Cite this page

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