Generated on Sat Feb 7 2015 02:01:33 for Gecode by doxygen 1.8.9.1
rounding.cpp File Reference

(Revision: 13260)

#include <gecode/float.hh>
#include <gmp.h>
#include <mpfr.h>

Go to the source code of this file.

Namespaces

 Gecode
 Gecode toplevel namespace
 
 Gecode::Float
 Floating point numbers.
 

Macros

#define GECODE_GENR_FUNC(name)
 Define mpfr functions with proper rounding. More...
 

Typedefs

typedef int Gecode::Float::mpfr_func(mpfr_t, const __mpfr_struct *, mp_rnd_t)
 Type signatur of mpfr function. More...
 

Functions

double Gecode::Float::invoke_mpfr (FloatNum x, mpfr_func f, mp_rnd_t r)
 Routine to call mpfr function with proper rounding. More...
 

Macro Definition Documentation

#define GECODE_GENR_FUNC (   name)
Value:
FloatNum Rounding::name##_down(FloatNum x) { \
return invoke_mpfr(x, mpfr_##name, GMP_RNDD); \
} \
FloatNum Rounding::name##_up(FloatNum x) { \
return invoke_mpfr(x, mpfr_##name, GMP_RNDU); \
}
double invoke_mpfr(FloatNum x, mpfr_func f, mp_rnd_t r)
Routine to call mpfr function with proper rounding.
Definition: rounding.cpp:56
Node * x
Pointer to corresponding Boolean expression node.
Definition: bool-expr.cpp:253
double FloatNum
Floating point number base type.
Definition: float.hh:108

Define mpfr functions with proper rounding.

Definition at line 66 of file rounding.cpp.