Generated on Thu Apr 11 13:59:25 2019 for Gecode by doxygen 1.6.3

rounding.cpp File Reference

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

Go to the source code of this file.

Namespaces

namespace  Gecode
 

Gecode toplevel namespace


namespace  Gecode::Float
 

Floating point numbers.


Defines

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

Typedefs

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

Functions

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

Define 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); \
  }

Define mpfr functions with proper rounding.

Definition at line 62 of file rounding.cpp.