FLINT3.7.0-dev

nmod_mpoly_fit_length, nmod_mpoly_realloc

Synopsis#include <flint/nmod_mpoly.h>
void nmod_mpoly_fit_length(nmod_mpoly_t A, slong length, const nmod_mpoly_ctx_t ctx)source
void nmod_mpoly_realloc(nmod_mpoly_t A, slong alloc, const nmod_mpoly_ctx_t ctx)source

nmod_mpoly_fit_length ensures that A has space for at least len terms, growing the allocation at least geometrically. nmod_mpoly_realloc changes the allocation to exactly alloc terms, which must be at least the current length; with alloc = 0 it frees the memory and sets A to zero.

Cite this page

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