From bd863f2a93c1891160a8c175a1c9e4db7be03037 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Mon, 11 Jun 2018 15:43:29 +0200 Subject: Add patch for rounding workaround on i686. --- .../patches/0009-Rounding-workaround-on-i686.patch | 21 +++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 22 insertions(+) create mode 100644 debian/patches/0009-Rounding-workaround-on-i686.patch diff --git a/debian/patches/0009-Rounding-workaround-on-i686.patch b/debian/patches/0009-Rounding-workaround-on-i686.patch new file mode 100644 index 00000000..39629fe1 --- /dev/null +++ b/debian/patches/0009-Rounding-workaround-on-i686.patch @@ -0,0 +1,21 @@ +From: Gard Spreemann +Date: Mon, 11 Jun 2018 15:42:51 +0200 +Subject: Rounding workaround on i686. + +--- + include/gudhi/Bottleneck.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/gudhi/Bottleneck.h b/include/gudhi/Bottleneck.h +index 7aee07b..ffa87a8 100644 +--- a/include/gudhi/Bottleneck.h ++++ b/include/gudhi/Bottleneck.h +@@ -42,7 +42,7 @@ double bottleneck_distance_approx(Persistence_graph& g, double e) { + Graph_matching m(g); + Graph_matching biggest_unperfect(g); + while (b_upper_bound - b_lower_bound > 2 * e) { +- double step = b_lower_bound + (b_upper_bound - b_lower_bound) / alpha; ++ volatile double step = b_lower_bound + (b_upper_bound - b_lower_bound) / alpha; + if (step <= b_lower_bound || step >= b_upper_bound) // Avoid precision problem + break; + m.set_r(step); diff --git a/debian/patches/series b/debian/patches/series index 6178386d..2a37f5ef 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ no-external-doc-resources.patch 0007-CGAL-4.12-compatibility.patch 0008-Force-linking-of-Python-module-with-CGAL.patch +0009-Rounding-workaround-on-i686.patch -- cgit v1.2.3