Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MATH-1558] Fix MidPointIntegrator incremental implementation #161

Merged
merged 1 commit into from Oct 21, 2020

Conversation

sritchie
Copy link
Contributor

This PR implements the fix described in https://issues.apache.org/jira/browse/MATH-1558, and fixes the implementation of the "stage" method in MidPointIntegrator.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.005%) to 90.704% when pulling e0b2efc on sritchie:MATH-1558-MidPointIntegrator into 0b3629b on apache:master.

@@ -48,8 +67,9 @@ public void testLowAccuracy() {
double expected = -3697001.0 / 48.0;
double tolerance = FastMath.abs(expected * integrator.getRelativeAccuracy());
double result = integrator.integrate(Integer.MAX_VALUE, f, min, max);
Assert.assertTrue(integrator.getEvaluations() < Integer.MAX_VALUE / 2);
Assert.assertTrue(integrator.getEvaluations() < Integer.MAX_VALUE / 3);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test might be redundant now that we know exactly how many evaluations we should have, as a function of iterations.

@asfgit asfgit merged commit e0b2efc into apache:master Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants