FLINT3.7.0-dev

flint_mpn_urandomm

Synopsis#include <flint/mpn_extras.h>
void flint_mpn_urandomm(mp_ptr rp, flint_rand_t state, mp_srcptr xp, mp_size_t xn)source

Sets (\mathit{rp}, \mathit{xn}) to a uniformly random integer in [0, x). Requires x_{xn-1} \ne 0. All \mathit{xn} limbs are written even if the value is shorter.

Cite this page

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