FLINT3.7.0-dev

_gr_vec_reciprocals

Synopsis#include <flint/gr_vec.h>
int _gr_vec_reciprocals(gr_ptr res, slong len, gr_ctx_t ctx)source

Sets res to the reciprocals 1, 1/2, 1/3, \ldots, 1/\mathit{len} of the first len positive integers. The default stops at the first failure, so in \mathbb{Z}/n\mathbb{Z} it returns GR_DOMAIN if some k \le \mathit{len} is not invertible.

Cite this page

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