commons-issues mailing list archives

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

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

Gilles commented on MATH-631:
-----------------------------

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

That was my first idea. And that would be the simplest one, the safest one, and the only viable
one as I can't seem to state clearly enough that
* Problem 1: When the doc says "guaranteed convergence", the algorithm should provide the
answer.
* Problem 2: When the (absolute) accuracy threshold is set to 1e-6, and the correct root *is*
found (after 2200 iterations) within the requirements, it should be returned, instead running
idle and finish with an exception

{quote}
The reason why we get stuck is irrelevant.
{quote}

But why? If we *can* be more precise on the cause of failure, why not do it?

{quote}
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.
{quote}

In principle, some possible use would be to compare the efficiency of different methods where
the main criterion would be a time limitation (assuming that the function evaluation time
overwhelms the of the root solver algorithm time). Thus with the function that triggered this
issue:
* If you set maxeval to "3000", then both "Pegasus" (17 evals) and (a fixed) "RegulaFalsi"
(2200 evals) would fill the bill.
* If you set maxeval to "1000", then "Pegasus" will be the only winner.


Anyways:
+1 for removing it altogether, and include somewhere the reason for it not being implemented
in CM.


> "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