FLINT3.7.0-dev

_gr_vec_normalise

Synopsis#include <flint/gr_vec.h>
int _gr_vec_normalise(slong * res, gr_srcptr vec, slong len, gr_ctx_t ctx)source

Sets *res to the length of vec with trailing zero entries removed: the largest n \le \mathit{len} such that entry n - 1 is nonzero. Returns GR_UNABLE if gr_is_zero returns T_UNKNOWN for an entry that would decide the length; *res is then the length up to that entry.

Cite this page

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