commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Hendriks (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MATH-631) "RegulaFalsiSolver" failure
Date Fri, 02 Sep 2011 09:00:11 GMT

     [ https://issues.apache.org/jira/browse/MATH-631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dennis Hendriks updated MATH-631:
---------------------------------

    Attachment: ticket631.patch

The 'ticket631.patch' file is my attempt to resolve this issue with a solution (or maybe I
should call it a compromise?) that is satisfactory for all people that participated in the
discussions for this issue, without having to remove the Regula Falsi algorithm from Commons
Math.

I changed the following:
 - Added early detection of no longer making progress ('getting stuck'), and documented it.
   -- I used ConvergenceException for this, as it seems to fit... Do we want a custom error
message with it?
 - Extended RegulaFalsiSolver documentation to indicate:
   -- that the algorithm should not be used for actual problems.
   -- that Illinois and Pegasus are improved versions and should be prefered.
   -- that the implementation does not guarantee convergence, while the algorithm theoretically
does.
 - Extended IllinoisSolver and PegasusSolver documentation to indicate that they don't suffer
from the RegulaFalsiSolver's implementation/convergence issues.

Please comment on whether this patch is an acceptable solution/compromise, and if not, why
it is not.

> "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
>
>         Attachments: ticket631.patch
>
>
> 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