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

◆ modf

const mpreal modf ( const mpreal & v,
mpreal & n )
friend

Definition at line 2153 of file mpreal.h.

2154{
2155 mpreal f(v);
2156
2157 // rounding is not important since we are using the same number
2158 mpfr_frac (f.mpfr_ptr(),f.mpfr_srcptr(),mpreal::get_default_rnd());
2159 mpfr_trunc(n.mpfr_ptr(),v.mpfr_srcptr());
2160 return f;
2161}

References get_default_rnd(), modf, mpfr_ptr(), mpfr_srcptr(), and mpreal().

Referenced by modf.