Macaulay2 Engine
Loading...
Searching...
No Matches

◆ grandom() [1/2]

const mpreal mpfr::grandom ( gmp_randstate_t & state,
mp_rnd_t rnd_mode = mpreal::get_default_rnd() )
inline

Definition at line 2881 of file mpreal.h.

2882{
2883 mpreal x;
2884#if (MPFR_VERSION >= MPFR_VERSION_NUM(4,0,0))
2885 mpfr_nrandom(x.mpfr_ptr(), state, rnd_mode);
2886#else
2887 mpfr_grandom(x.mpfr_ptr(), NULL, state, rnd_mode);
2888#endif
2889 return x;
2890}
volatile int x
static gmp_randstate_t state
Definition random.cpp:18

Referenced by mpfr::mpreal::grandom.