commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-631) "RegulaFalsiSolver" failure
Date Mon, 08 Aug 2011 08:38:27 GMT

    [ https://issues.apache.org/jira/browse/MATH-631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080817#comment-13080817
] 

Luc Maisonobe commented on MATH-631:
------------------------------------

I don't understand.

When it was created, the maxIteration threshold was exactly designed for this purpose: get
out of infinite loops. It was later renamed maxEvaluation but the purpose is still the same:
don't get stuck. The reason why we get stuck is irrelevant. This limit is simply a safety
limit, not a tuning parameter that user are expected to raise once they hit it hoping they
will converge later on. If they could raise it later, then they should set it to an appropriate
value at once. Hitting it implies computation failed. Regula falsi just like any algorithm
can fail if applied with the wrong parameters or to the wrong function (in fact, even with
a good setting of function accuracy, it fails to converge if we require a bracket selection
on the side that does not move).

Also detecting one bound is not updated is what Illinois and Pegasus are designed to do.

So I think we should completely get rid of regula falsi and only keep the better algorithms.

> "RegulaFalsiSolver" failure
> ---------------------------
>
>                 Key: MATH-631
>                 URL: https://issues.apache.org/jira/browse/MATH-631
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Gilles
>             Fix For: 3.0
>
>
> The following unit test:
> {code}
> @Test
> public void testBug() {
>     final UnivariateRealFunction f = new UnivariateRealFunction() {
>             @Override
>             public double value(double x) {
>                 return Math.exp(x) - Math.pow(Math.PI, 3.0);
>             }
>         };
>     UnivariateRealSolver solver = new RegulaFalsiSolver();
>     double root = solver.solve(100, f, 1, 10);
> }
> {code}
> fails with
> {noformat}
> illegal state: maximal count (100) exceeded: evaluations
> {noformat}
> Using "PegasusSolver", the answer is found after 17 evaluations.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message