From 7f8f7e2f237fce0fbfb3622aa3b009e25ee991c7 Mon Sep 17 00:00:00 2001 From: Brian Spilsbury Date: Wed, 3 Mar 2021 00:32:09 +0900 Subject: [PATCH] wip --- Number_types/include/CGAL/Interval_nt.h | 10 +++++++--- ...aunay_triangulation_cell_base_with_circumcenter_3.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Number_types/include/CGAL/Interval_nt.h b/Number_types/include/CGAL/Interval_nt.h index e94d1c6cb2b..1b7a836c14e 100644 --- a/Number_types/include/CGAL/Interval_nt.h +++ b/Number_types/include/CGAL/Interval_nt.h @@ -1142,16 +1142,20 @@ namespace INTERN_INTERVAL_NT { // it helps significantly, it might even hurt by introducing a // dependency. } -#else +#else // no __AVX512F__ // TODO: Alternative for computing CGAL_IA_SQRT_DOWN(d.inf()) exactly // without changing the rounding mode: // - compute x = CGAL_IA_SQRT(d.inf()) // - compute y = CGAL_IA_SQUARE(x) // - if y==d.inf() use x, else use -CGAL_IA_SUB(CGAL_IA_MIN_DOUBLE,x) - FPU_set_cw(CGAL_FE_DOWNWARD); +#ifdef CGAL_ALWAYS_ROUND_TO_NEAREST double i = (d.inf() > 0.0) ? nextafter(std::sqrt(d.inf()), 0.) : 0.0; +#else // no CGAL_ALWAYS_ROUND_TO_NEAREST + FPU_set_cw(CGAL_FE_DOWNWARD); + double i = (d.inf() > 0.0) ? CGAL_IA_SQRT(d.inf()) : 0.0; FPU_set_cw(CGAL_FE_UPWARD); -#endif +#endif // no CGAL_ALWAYS_ROUND_TO_NEAREST +#endif // no __AVX512F__ return Interval_nt(i, CGAL_IA_SQRT(d.sup())); } diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h index 14fc74d8490..1c437177712 100644 --- a/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h +++ b/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h @@ -130,7 +130,7 @@ public: circumcenter_ = new Point(this->Cb::circumcenter(gt)); } else { CGAL_expensive_assertion( - this->Cb::circumcenter(gt) == *circumcenter); + this->Cb::circumcenter(gt) == *circumcenter_); } return *circumcenter_;