FLINT3.7.0-dev

mpn_mod_set_other

Synopsis#include <flint/mpn_mod.h>
int mpn_mod_set_other(nn_ptr res, gr_ptr v, gr_ctx_t v_ctx, gr_ctx_t ctx)source

Sets res to the element v of the ring v_ctx, converted to \mathbb{Z}/n\mathbb{Z}. Elements of another mpn_mod ring and of an fmpz_mod ring (gr_ctx_init_fmpz_mod) with the same modulus are copied directly; all other cases go through gr_generic_set_other (integers, rationals with invertible denominator, and so on). Returns GR_DOMAIN or GR_UNABLE when there is no such conversion.

Cite this page

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