FLINT3.7.0-dev

mpn_mod_div

Synopsis#include <flint/mpn_mod.h>
int mpn_mod_div(nn_ptr res, nn_srcptr x, nn_srcptr y, gr_ctx_t ctx)source

Sets res to x y^{-1} \bmod n, computing the inverse with mpn_mod_inv. If y is not invertible, sets res to zero and returns the status of mpn_mod_inv, even if some z with yz = x exists.

Guides#

Cite this page

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