flint_mpn_is_square_mod
Synopsis
#include <flint/mpn_extras.h>Returns 1 if a is a square modulo the odd prime d, and 0 if it is not. This evaluates the Jacobi symbol (a/d) with GMP, in quasi-linear time; a return value of 0 means that the symbol is -1, so it also proves that a is not a square for an odd d that is not prime, while a return value of 1 proves nothing in that case.
Cite this page
The FLINT team, “flint_mpn_is_square_mod (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_mod.html (generated 2026-10-20).
@misc{flint-doc-mpn-extras-flint-mpn-is-square-mod,
author = {{The FLINT team}},
title = {{flint\_mpn\_is\_square\_mod (mpn\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_extras/flint_mpn_is_square_mod.html},
note = {Generated 2026-10-20}
}