_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)sourcevoid fmpz_mpoly_truncate(fmpz_mpoly_t A, slong newlen, const fmpz_mpoly_ctx_t ctx)sourceSet 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).
@misc{flint-doc-fmpz-mpoly-fmpz-mpoly-set-length,
author = {{The FLINT team}},
title = {{\_fmpz\_mpoly\_set\_length, fmpz\_mpoly\_truncate (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_set_length.html},
note = {Generated 2026-10-20}
}