FLINT3.7.0-dev

_fmpz_poly_set_length

Synopsis#include <flint/fmpz_poly.h>
void _fmpz_poly_set_length(fmpz_poly_t poly, slong newlen)source

Sets the length of poly to newlen. If the length decreases, the dropped coefficients are set to zero (freeing their memory), which keeps the invariant that coefficients beyond the length are zero. No normalisation is done; poly must have space for newlen coefficients.

Guides#

Cite this page

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