FLINT3.7.0-dev

gr_poly_fit_length, _gr_poly_fit_length

Synopsis#include <flint/gr_poly.h>
void gr_poly_fit_length(gr_poly_t poly, slong len, gr_ctx_t ctx)source
void _gr_poly_fit_length(gr_poly_t poly, slong len, gr_ctx_t ctx)source

Ensures that poly has space for at least len coefficients, without changing its length or coefficients. The inline function gr_poly_fit_length calls _gr_poly_fit_length only when the current allocation is too small; the latter grows the allocation to at least twice its old size, so that repeated calls cost amortised linear time.

Guides#

Cite this page

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