MATH-631
Reverted to original behaviour. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157185 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
565b6b527f
commit
ebc61de97f
|
@ -183,14 +183,7 @@ public abstract class BaseSecantSolver
|
|||
f0 *= f1 / (f1 + fx);
|
||||
break;
|
||||
case REGULA_FALSI:
|
||||
if (x == x1) {
|
||||
final double delta = FastMath.max(rtol * FastMath.abs(x1),
|
||||
atol);
|
||||
// Update formula cannot make any progress: Update the
|
||||
// search interval.
|
||||
x0 = 0.5 * (x0 + x1 - delta);
|
||||
f0 = computeObjectiveValue(x0);
|
||||
}
|
||||
// Nothing.
|
||||
break;
|
||||
default:
|
||||
// Should never happen.
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package org.apache.commons.math.analysis.solvers;
|
||||
|
||||
import org.apache.commons.math.analysis.UnivariateRealFunction;
|
||||
import org.apache.commons.math.exception.TooManyEvaluationsException;
|
||||
import org.junit.Test;
|
||||
import org.junit.Assert;
|
||||
|
||||
|
@ -40,7 +41,7 @@ public final class RegulaFalsiSolverTest extends BaseSecantSolverAbstractTest {
|
|||
return new int[] {3, 7, 8, 19, 18, 11, 67, 55, 288, 151, -1};
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(expected=TooManyEvaluationsException.class)
|
||||
public void testIssue631() {
|
||||
final UnivariateRealFunction f = new UnivariateRealFunction() {
|
||||
/** {@inheritDoc} */
|
||||
|
|
Loading…
Reference in New Issue