diff options
Diffstat (limited to 'tests/HE12.cpp')
-rw-r--r-- | tests/HE12.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/HE12.cpp b/tests/HE12.cpp index 8de11e8..c3515c2 100644 --- a/tests/HE12.cpp +++ b/tests/HE12.cpp @@ -23,11 +23,11 @@ #include <iostream> #include <iomanip> -// 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 > 8.7e-7 || !std::isfinite(error)) { + if (error > 4.9e-7 || !std::isfinite(error)) { std::cerr << "Error: " << 100.0*error << "%" << std::endl; return EXIT_FAILURE; } else { |