_gr_poly_set_length_normalise, _gr_poly_normalise
#include <flint/gr_poly.h>Set the length of poly to len (respectively keep the current length) and then decrease it while the leading coefficient is provably zero. This is the usual last step after an underscore function has written coefficients. Both call the ring method GR_METHOD_POLY_SET_LENGTH_NORMALISE, whose default gr_generic_poly_set_length_normalise zeroes the dropped coefficients like _gr_poly_set_length; rings with shallow elements (nmod, fmpz_mod, mpn_mod, nmod8, nmod32) override it to compute only the new length.
Guides#
The FLINT team, “_gr_poly_set_length_normalise, _gr_poly_normalise (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_set_length_normalise.html (generated 2026-10-20).
@misc{flint-doc-gr-poly-gr-poly-set-length-normalise,
author = {{The FLINT team}},
title = {{\_gr\_poly\_set\_length\_normalise, \_gr\_poly\_normalise (gr\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_poly/_gr_poly_set_length_normalise.html},
note = {Generated 2026-10-20}
}