summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Midpoint.cpp4
-rw-r--r--tests/RK4.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/Midpoint.cpp b/tests/Midpoint.cpp
index 9be7bb7..c16fb76 100644
--- a/tests/Midpoint.cpp
+++ b/tests/Midpoint.cpp
@@ -15,7 +15,7 @@ int
main()
{
vZ::MidpointIntegrator integrator(f);
- integrator.y(1.0).x(0.0).h(0.01);
+ integrator.y(1.0).x(0.0).h(0.02);
integrator.integrate(2.0);
@@ -27,7 +27,7 @@ main()
<< "Expected: " << expected << std::endl;
double error = std::fabs(expected - actual)/expected;
- if (error > 3.4e-5) {
+ if (error > 1.4e-4) {
std::cerr << "Error: " << 100.0*error << "%" << std::endl;
return EXIT_FAILURE;
} else {
diff --git a/tests/RK4.cpp b/tests/RK4.cpp
index 7165c76..2090a1e 100644
--- a/tests/RK4.cpp
+++ b/tests/RK4.cpp
@@ -15,7 +15,7 @@ int
main()
{
vZ::RK4Integrator integrator(f);
- integrator.y(1.0).x(0.0).h(0.01);
+ integrator.y(1.0).x(0.0).h(0.04);
integrator.integrate(2.0);
@@ -27,7 +27,7 @@ main()
<< "Expected: " << expected << std::endl;
double error = std::fabs(expected - actual)/expected;
- if (error > 1.7e-10) {
+ if (error > 4.2e-8) {
std::cerr << "Error: " << 100.0*error << "%" << std::endl;
return EXIT_FAILURE;
} else {