From 91ca53ae1f10023480ad72f6a07c9b9043f2526a Mon Sep 17 00:00:00 2001 From: tdurieux Date: Tue, 7 Mar 2017 13:16:45 +0100 Subject: [PATCH] fixed files form Math #48 --- .../apache/commons/math/analysis/solvers/BaseSecantSolver.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/Math/48/org/apache/commons/math/analysis/solvers/BaseSecantSolver.java b/projects/Math/48/org/apache/commons/math/analysis/solvers/BaseSecantSolver.java index 8a667da..0347525 100644 --- a/projects/Math/48/org/apache/commons/math/analysis/solvers/BaseSecantSolver.java +++ b/projects/Math/48/org/apache/commons/math/analysis/solvers/BaseSecantSolver.java @@ -186,6 +186,9 @@ protected final double doSolve() { case REGULA_FALSI: // Detect early that algorithm is stuck, instead of waiting // for the maximum number of iterations to be exceeded. + if (x == x1) { + throw new ConvergenceException(); + } break; default: // Should never happen.