MCPcopy Create free account
hub / github.com/Gecode/gecode / invoke_mpfr

Function invoke_mpfr

gecode/float/rounding.cpp:51–59  ·  view source on GitHub ↗

Routine to call mpfr function with proper rounding

Source from the content-addressed store, hash-verified

49
50 /// Routine to call mpfr function with proper rounding
51 forceinline double
52 invoke_mpfr(FloatNum x, mpfr_func f, mp_rnd_t r) {
53 mpfr_t xx;
54 mpfr_init_set_d(xx, x, GMP_RNDN);
55 f(xx, xx, r);
56 FloatNum res = mpfr_get_d(xx, r);
57 mpfr_clear(xx);
58 return res;
59 }
60
61 /// Define mpfr functions with proper rounding
62#define GECODE_GENR_FUNC(name) \

Callers

nothing calls this directly

Calls 1

fFunction · 0.85

Tested by

no test coverage detected