FLINT3.7.0-dev

mpoly_monomial_halves, mpoly_monomial_halves1, mpoly_monomial_halves_mp

Synopsis#include <flint/mpoly.h>
int mpoly_monomial_halves(ulong * exp_ptr, const ulong * exp2, slong N, ulong mask)source
int mpoly_monomial_halves1(ulong * exp_ptr, const ulong exp2, ulong mask)source
int mpoly_monomial_halves_mp(ulong * exp_ptr, const ulong * exp2, slong N, flint_bitcnt_t bits)source

Return whether the monomial exp2 is a square, that is, every field is even, and if so set exp_ptr to its square root. The single precision versions shift whole words right by one bit, so that the low bit of each field lands in the guard bit of the field below, where the overflow test detects it.

Cite this page

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