FLINT3.7.0-dev

mpn_mod_mul_ui, mpn_mod_mul_si, mpn_mod_mul_fmpz

Synopsis#include <flint/mpn_mod.h>
int mpn_mod_mul_ui(nn_ptr res, nn_srcptr x, ulong y, gr_ctx_t ctx)source
int mpn_mod_mul_si(nn_ptr res, nn_srcptr x, slong y, gr_ctx_t ctx)source
int mpn_mod_mul_fmpz(nn_ptr res, nn_srcptr x, const fmpz_t y, gr_ctx_t ctx)source

Set res to xy \bmod n, for reduced x and any integer y. The product x |y| is formed exactly and reduced with mpn_mod_set_mpn (an fmpz with more limbs than n is reduced first).

Cite this page

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