From 1d2bcd60d3e0cb8649ba5d2ae8672457849656ce Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 10 Jun 2011 01:21:32 -0600 Subject: Make the test DE care about x. --- tests/RKF45.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/RKF45.cpp') diff --git a/tests/RKF45.cpp b/tests/RKF45.cpp index 164aba3..11ee539 100644 --- a/tests/RKF45.cpp +++ b/tests/RKF45.cpp @@ -23,11 +23,11 @@ #include #include -// y' = y (y == C*exp(x)) +// y' = x*y (y == C*exp(x^2/2)) double f(double x, double y) { - return y; + return x*y; } int @@ -52,7 +52,7 @@ main() << "Rejections: " << integrator.rejections() << std::endl; double error = std::abs(expected - actual)/std::abs(expected); - if (error > 1.7e-6 || !std::isfinite(error)) { + if (error > 1.1e-5 || !std::isfinite(error)) { std::cerr << "Error: " << 100.0*error << "%" << std::endl; return EXIT_FAILURE; } else { -- cgit v1.2.3