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 Sun, 07 Aug 2011 21:00:28 GMT

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

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

{quote}
The documentation says: "convergence is guaranteed". Is that false?
{quote}

It depends on what is called convergence.
If convergence is evaluated only as the best of the two endpoints, yes convergence is guaranteed
and in this case it is very slow. This is what appears in many analysis books.
If convergence is evaluated by ensuring the bracketing interval reduces to zero (i.e. both
endpoints converge to the root), convergence is not guaranteed.

The first case is achieved with our implementation by using the function accuracy setting.
The second case is achieved with our implementation by using relative accuracy and absolute
accuracy settings, which both are computed along x axis.

I fear that their are several different references about convergence for this method (just
as for Brent). So we already are able to implement both views.

Without any change to our implementation, we reach convergence for this example by setting
the function accuracy to 7.4e-13 or above, and it is slow (about 3500 evaluations). The default
setting for function accuracy is very low (1.0e-15) and in this case, given the variation
rate of the function near the root, it is equivalent to completely ignore convergence on y
on only check the convergence on the interval length along x. 


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