fmpz_mpoly_sqrt_heap
Synopsis
#include <flint/fmpz_mpoly.h>int fmpz_mpoly_sqrt_heap(fmpz_mpoly_t q, const fmpz_mpoly_t poly2, const fmpz_mpoly_ctx_t ctx, int check)sourceIf poly2 is the square of a polynomial, sets q to the square root with positive leading coefficient and returns 1; otherwise sets q to zero and returns 0. The terms of the root are computed in order with a heap, as in division [MonPea2011]. With check equal to 0 the input is assumed to be a square and the remaining terms are not verified, which saves time but gives a meaningless result for non-squares.
References#
- [MonPea2011] M. Monagan and R. Pearce. Sparse polynomial division using a heap. Journal of Symbolic Computation 46:7 (2011), 807–822. https://doi.org/10.1016/j.jsc.2010.08.014
Cite this page
The FLINT team, “fmpz_mpoly_sqrt_heap (fmpz_mpoly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mpoly/fmpz_mpoly_sqrt_heap.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mpoly-fmpz-mpoly-sqrt-heap,
author = {{The FLINT team}},
title = {{fmpz\_mpoly\_sqrt\_heap (fmpz\_mpoly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mpoly/fmpz_mpoly_sqrt_heap.html},
note = {Generated 2026-10-20}
}