diff --git a/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java b/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java index 09c73f62c..53239824e 100644 --- a/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java +++ b/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java @@ -157,7 +157,7 @@ public class AdamsBashforthIntegrator extends MultistepIntegrator { final double scalAbsoluteTolerance, final double scalRelativeTolerance) throws IllegalArgumentException { - super("Adams-Bashforth", nSteps, nSteps + 1, minStep, maxStep, + super("Adams-Bashforth", nSteps, nSteps, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance); } @@ -177,7 +177,7 @@ public class AdamsBashforthIntegrator extends MultistepIntegrator { final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) throws IllegalArgumentException { - super("Adams-Bashforth", nSteps, nSteps + 1, minStep, maxStep, + super("Adams-Bashforth", nSteps, nSteps, minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance); } diff --git a/src/test/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java b/src/test/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java index c9876a713..d376055cc 100644 --- a/src/test/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java +++ b/src/test/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java @@ -78,11 +78,11 @@ public class AdamsBashforthIntegratorTest { pb.getInitialTime(), pb.getInitialState(), pb.getFinalTime(), new double[pb.getDimension()]); - // the 28 and 42 factors are only valid for this test + // the 33 and 45 factors are only valid for this test // and has been obtained from trial and error // there is no general relation between local and global errors - assertTrue(handler.getMaximalValueError() > (28.0 * scalAbsoluteTolerance)); - assertTrue(handler.getMaximalValueError() < (42.0 * scalAbsoluteTolerance)); + assertTrue(handler.getMaximalValueError() > (33.0 * scalAbsoluteTolerance)); + assertTrue(handler.getMaximalValueError() < (45.0 * scalAbsoluteTolerance)); assertEquals(0, handler.getMaximalTimeError(), 1.0e-16); int calls = pb.getCalls();