Skip to content

Commit

Permalink
Restore floating point rounding mode on Windows (fixes #45)
Browse files Browse the repository at this point in the history
  • Loading branch information
chschulte committed Mar 20, 2019
1 parent bd9e549 commit e733699
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 41 deletions.
8 changes: 8 additions & 0 deletions changelog.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ Date: 2019-??-??
[DESCRIPTION]
Let's see.

[ENTRY]
Module: float
What: bug
Rank: minor
Thanks: Kurt Van Den Branden
[DESCRIPTION]
Restore floating point rounding mode under Windows.

[ENTRY]
Module: kernel
What: change
Expand Down
46 changes: 5 additions & 41 deletions gecode/float.hh
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ namespace Gecode { namespace Float {
*
*/
/// Rounding Base class (safe version)
typedef gecode_boost::numeric::interval_lib::rounded_arith_std<FloatNum>
RoundingBase;
typedef gecode_boost::numeric::interval_lib::save_state< gecode_boost::numeric::interval_lib::rounded_arith_std<FloatNum> >
RoundingBase;

#else

Expand Down Expand Up @@ -1949,23 +1949,12 @@ namespace Gecode {
FloatVarValPrint vvp=nullptr);

/**
* \brief Assign all \a x with variable selection \a vars and value selection \a vals
*
* \ingroup TaskModelFloatBranch
*/
GECODE_FLOAT_EXPORT void
assign(Home home, const FloatVarArgs& x,
FloatVarBranch vars, FloatAssign vals,
FloatBranchFilter bf=nullptr,
FloatVarValPrint vvp=nullptr);
/**
* \brief Assign all \a x with tie-breaking variable selection \a vars and value selection \a vals
* \brief Assign all \a x with value selection \a vals
*
* \ingroup TaskModelFloatBranch
*/
GECODE_FLOAT_EXPORT void
assign(Home home, const FloatVarArgs& x,
TieBreak<FloatVarBranch> vars, FloatAssign vals,
assign(Home home, const FloatVarArgs& x, FloatAssign vals,
FloatBranchFilter bf=nullptr,
FloatVarValPrint vvp=nullptr);
/**
Expand All @@ -1976,35 +1965,10 @@ namespace Gecode {
GECODE_FLOAT_EXPORT void
assign(Home home, FloatVar x, FloatAssign vals,
FloatVarValPrint vvp=nullptr);
//@}

}

namespace Gecode {

/**
* \brief Branch over \a x with value selection \a vals
*
* \ingroup TaskModelFloatBranch
*/
void
branch(Home home, const FloatVarArgs& x, FloatValBranch vals,
FloatBranchFilter bf=nullptr,
FloatVarValPrint vvp=nullptr);

/**
* \brief Assign all \a x with value selection \a vals
*
* \ingroup TaskModelFloatBranch
*/
void
assign(Home home, const FloatVarArgs& x, FloatAssign vals,
FloatBranchFilter bf=nullptr,
FloatVarValPrint vvp=nullptr);

}

#include <gecode/float/branch.hpp>

namespace Gecode {

/*
Expand Down

0 comments on commit e733699

Please sign in to comment.