mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'cgal/releases/CGAL-4.7-branch'
This commit is contained in:
commit
0b44d790a9
|
|
@ -37,6 +37,8 @@
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
#include <CGAL/FPU.h>
|
#include <CGAL/FPU.h>
|
||||||
|
|
||||||
|
#include <boost/math/special_functions/next.hpp>
|
||||||
|
|
||||||
namespace CGAL { namespace internal {
|
namespace CGAL { namespace internal {
|
||||||
|
|
||||||
struct Static_filter_error
|
struct Static_filter_error
|
||||||
|
|
@ -66,15 +68,8 @@ struct Static_filter_error
|
||||||
d = CGAL_IA_FORCE_TO_DOUBLE(d); // stop constant propagation.
|
d = CGAL_IA_FORCE_TO_DOUBLE(d); // stop constant propagation.
|
||||||
CGAL_assertion(d>=0);
|
CGAL_assertion(d>=0);
|
||||||
double u;
|
double u;
|
||||||
if (d == 1) // I need to special case to prevent infinite recursion.
|
double nd = boost::math::float_next(d);
|
||||||
u = (d + CGAL_IA_MIN_DOUBLE) - d;
|
u = nd - 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();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Then add extra bonus, because of Intel's extended precision feature.
|
// Then add extra bonus, because of Intel's extended precision feature.
|
||||||
// (ulp can be 2^-53 + 2^-64)
|
// (ulp can be 2^-53 + 2^-64)
|
||||||
u += u / (1<<11);
|
u += u / (1<<11);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue