From cdf55000e2921c967a16f48ced695ebe7de6458b Mon Sep 17 00:00:00 2001
From: David Dorchies <david.dorchies@irstea.fr>
Date: Mon, 12 Aug 2019 16:10:17 +0200
Subject: [PATCH] Solve regression on #116 due to
 813c7ae05596c8970d87df3f8aa4a00b67394e2b

---
 src/dichotomie.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dichotomie.ts b/src/dichotomie.ts
index 9c5ccc1f..278390dc 100644
--- a/src/dichotomie.ts
+++ b/src/dichotomie.ts
@@ -521,7 +521,7 @@ export class Dichotomie extends Debug {
                 Math.abs(newStep) <= tolAct
                 && (
                     Math.abs(fb) < errorTol
-                    || Math.abs(fb / fc) < 1
+                    || Math.abs(fb - fc) < errorTol * 1E5
                 )
             ) {
                 return b; // Acceptable approx. is found
-- 
GitLab