FLINT3.7.0-dev

gr_vec_set_length

Synopsis#include <flint/gr_vec.h>
void gr_vec_set_length(gr_vec_t vec, slong len, gr_ctx_t ctx)source

Sets the length to len, which must be nonnegative. New entries are zero; entries beyond the new length are set to zero, freeing the memory they own, but stay allocated.

Cite this page

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