diff --git a/projects/Math/73/org/apache/commons/math/analysis/solvers/BrentSolver.java b/projects/Math/73/org/apache/commons/math/analysis/solvers/BrentSolver.java index 8142b5e..e0cb427 100644 --- a/projects/Math/73/org/apache/commons/math/analysis/solvers/BrentSolver.java +++ b/projects/Math/73/org/apache/commons/math/analysis/solvers/BrentSolver.java @@ -133,6 +133,10 @@ public double solve(final UnivariateRealFunction f, return solve(f, initial, yInitial, max, yMax, initial, yInitial); } + if (yMin * yMax > 0) { + throw MathRuntimeException.createIllegalArgumentException( + NON_BRACKETING_MESSAGE, min, max, yMin, yMax); + } // full Brent algorithm starting with provided initial guess return solve(f, min, yMin, max, yMax, initial, yInitial);