diff options
Diffstat (limited to 'tests/Heun.cpp')
-rw-r--r-- | tests/Heun.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Heun.cpp b/tests/Heun.cpp index 6eca969..f1b4364 100644 --- a/tests/Heun.cpp +++ b/tests/Heun.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 @@ -49,7 +49,7 @@ main() << "Iterations: " << integrator.iterations() << std::endl; double error = std::abs(expected - actual)/std::abs(expected); - if (error > 1.4e-4 || !std::isfinite(error)) { + if (error > 2.7e-4 || !std::isfinite(error)) { std::cerr << "Error: " << 100.0*error << "%" << std::endl; return EXIT_FAILURE; } else { |