diff --git a/projects/Math/24/org/apache/commons/math3/optimization/univariate/BrentOptimizer.java b/projects/Math/24/org/apache/commons/math3/optimization/univariate/BrentOptimizer.java index b6ce68e..cff5bfd 100644 --- a/projects/Math/24/org/apache/commons/math3/optimization/univariate/BrentOptimizer.java +++ b/projects/Math/24/org/apache/commons/math3/optimization/univariate/BrentOptimizer.java @@ -227,7 +227,7 @@ protected UnivariatePointValuePair doOptimize() { if (checker != null) { if (checker.converged(iter, previous, current)) { - return current; + return best(current, previous, isMinim); } } @@ -264,7 +264,7 @@ protected UnivariatePointValuePair doOptimize() { } } } else { // Default termination (Brent's criterion). - return current; + return best(current, previous, isMinim); } ++iter; }