summaryrefslogtreecommitdiff
path: root/debian/patches/0009-Rounding-workaround-on-i686.patch
blob: 39629fe180f46166c55c15da6ec14f9c92fe889b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Gard Spreemann <gspreemann@gmail.com>
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);