From 3aa739d005879b89fbee8c914c99ca285c8b2424 Mon Sep 17 00:00:00 2001 From: Gilles Chabert Date: Wed, 4 Sep 2019 11:59:48 +0200 Subject: [PATCH] optim: fix wrong computation in anticipated filtering --- plugins/optim/src/strategy/ibex_Optimizer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/optim/src/strategy/ibex_Optimizer.cpp b/plugins/optim/src/strategy/ibex_Optimizer.cpp index af3864c7e..4845a7071 100644 --- a/plugins/optim/src/strategy/ibex_Optimizer.cpp +++ b/plugins/optim/src/strategy/ibex_Optimizer.cpp @@ -65,7 +65,12 @@ Optimizer::~Optimizer() { // the heap and the current box are contracted with y <= ymax double Optimizer::compute_ymax() { if (anticipated_upper_bounding) { - double ymax = loup - rel_eps_f*fabs(loup); + //double ymax = loup - rel_eps_f*fabs(loup); ---> wrong :the relative precision must be correct for ymax (not loup) + double ymax = loup>0 ? + 1/(1+rel_eps_f)*loup + : + 1/(1-rel_eps_f)*loup; + if (loup - abs_eps_f < ymax) ymax = loup - abs_eps_f; return ymax;