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

Gilles Sadowski commented on MATH-1612:
---------------------------------------

bq. It does seem odd that you can specify the minimalIterationCount to the 
SimpsonIntegrator and then call it to do an integration with a number of 
function evaluations that will throw an error because it cannot possibly finish 
before it reaches this level.

That's bad indeed.
Should we add a sanity check?

bq. It is not a regression, just a problem with the API.

I called it "regression" because the issue showed when adapting code that used 
the "math3" equivalent functionality and did not raise the exception, perhaps 
because the count (515) was wrong (?) in that previous implementation...


> Regression in "SimpsonIntegrator"?
> ----------------------------------
>
>                 Key: MATH-1612
>                 URL: https://issues.apache.org/jira/browse/MATH-1612
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Gilles Sadowski
>            Priority: Major
>             Fix For: 4.0
>
>
> The following code:
> {code}
> final UnivariateFunction f = PolynomialsUtils.createHermitePolynomial(deg);
> final double integ = new SimpsonIntegrator(9, 50).integrate(1100, f, 0, 0.5);
> {code}
> terminates as expected, while this one
> {code}
> final UnivariateFunction f = PolynomialsUtils.createHermitePolynomial(deg);
> final double integ = new SimpsonIntegrator(10, 50).integrate(1100, f, 0, 0.5);
> {code}
> raises an exception:
> {noformat}
> TooManyEvaluationsException: illegal state: maximal count (1,100) exceeded: 
> evaluations
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to