commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] Updated: (MATH-464) LegendreGaussIntegrator ignores defaultMaximalIterationCount and does 38 million iterations
Date Sat, 15 Jan 2011 16:57:46 GMT

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

Phil Steitz updated MATH-464:
-----------------------------

    Fix Version/s:     (was: 2.2)
                   3.0

Moving to 3.0.  I don't think this is a bug, but points to a couple of possible enhancements:

1) higher order formulas (+0 on this suggestion from Luc - IMO the example and others like
it are not suitable for Legendre-Gauss)
2) bound on the number of function evaluations (I vaguely recall us talking about this elsewhere,
but can't find the reference.  If anyone else can, pls add.)

> LegendreGaussIntegrator ignores defaultMaximalIterationCount and does 38 million iterations
> -------------------------------------------------------------------------------------------
>
>                 Key: MATH-464
>                 URL: https://issues.apache.org/jira/browse/MATH-464
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Michael Borcherds
>            Priority: Critical
>             Fix For: 3.0
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> The following code results in count = 37801710 which is effectively an infinite loop
for typical functions we are using
> (in GeoGebra)
> The argument defaultMaximalIterationCount = 100 is being ignored
> This is the version we are using:
> http://www.geogebra.org/trac/browser/trunk/geogebra/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
>     	LegendreGaussIntegrator gauss = new LegendreGaussIntegrator(5, 100);
>     
> 	try {
> 		double result = gauss.integrate(new testFun(), -10, 0.32462367623786328);
> 	} catch (Exception ee) {
> 		ee.printStackTrace();
> 	}
> class testFun implements UnivariateRealFunction {
>     public double value(double x) throws FunctionEvaluationException {
>     	count ++;
>         if (x>=0 && x<=5) return 0.2; else return 0;
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message