Merge remote-tracking branch 'cgal/releases/CGAL-4.7-branch'

This commit is contained in:
Sébastien Loriot 2016-02-04 15:33:25 +01:00
commit 0b44d790a9
1 changed files with 4 additions and 9 deletions

View File

@ -37,6 +37,8 @@
#include <CGAL/basic.h>
#include <CGAL/FPU.h>
#include <boost/math/special_functions/next.hpp>
namespace CGAL { namespace internal {
struct Static_filter_error
@ -66,15 +68,8 @@ struct Static_filter_error
d = CGAL_IA_FORCE_TO_DOUBLE(d); // stop constant propagation.
CGAL_assertion(d>=0);
double u;
if (d == 1) // I need to special case to prevent infinite recursion.
u = (d + CGAL_IA_MIN_DOUBLE) - d;
else {
// We need to use the d*ulp formula, in order for the formal proof
// of homogeneisation to work.
// u = (d + CGAL_IA_MIN_DOUBLE) - d;
u = d * ulp();
}
double nd = boost::math::float_next(d);
u = nd - d;
// Then add extra bonus, because of Intel's extended precision feature.
// (ulp can be 2^-53 + 2^-64)
u += u / (1<<11);