FLINT3.7.0-dev

_fmpz_mpoly_set_length, fmpz_mpoly_truncate

Synopsis#include <flint/fmpz_mpoly.h>
void _fmpz_mpoly_set_length(fmpz_mpoly_t A, slong newlen, const fmpz_mpoly_ctx_t ctx)source
void fmpz_mpoly_truncate(fmpz_mpoly_t A, slong newlen, const fmpz_mpoly_ctx_t ctx)source

Set the length of A to newlen, demoting the coefficients that are dropped so that no memory is held by them. _fmpz_mpoly_set_length requires newlen to be at most the allocation and may also increase the length; fmpz_mpoly_truncate only decreases it, keeping the first newlen terms.

Cite this page

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