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

◆ ldexp()

const mpreal mpfr::ldexp ( const mpreal & v,
mp_exp_t exp )
inline

Definition at line 2073 of file mpreal.h.

2074{
2075 mpreal x(v);
2076
2077 // rounding is not important since we are just increasing the exponent (= exact operation)
2078 mpfr_mul_2si(x.mpfr_ptr(), x.mpfr_srcptr(), exp, mpreal::get_default_rnd());
2079 return x;
2080}
static mp_rnd_t get_default_rnd()
Definition mpreal.h:182
const mpreal exp(const mpreal &x, mp_rnd_t r=mpreal::get_default_rnd())
Definition mpreal.h:2298
volatile int x

References exp(), mpfr::mpreal::get_default_rnd(), ldexp(), and x.

Referenced by ldexp(), and scalbn().