diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-06-10 01:21:32 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-06-10 01:21:32 -0600 |
commit | 1d2bcd60d3e0cb8649ba5d2ae8672457849656ce (patch) | |
tree | 0fdec95e8d38eab2bd922dfdada6731823e5a37b /tests/Midpoint.cpp | |
parent | d03ab99aa999544403652e0739c9bea3b8b7835e (diff) | |
download | vz-1d2bcd60d3e0cb8649ba5d2ae8672457849656ce.tar.xz |
Make the test DE care about x.
Diffstat (limited to 'tests/Midpoint.cpp')
-rw-r--r-- | tests/Midpoint.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Midpoint.cpp b/tests/Midpoint.cpp index 77c7f68..c6f9ef6 100644 --- a/tests/Midpoint.cpp +++ b/tests/Midpoint.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 > 4.6e-4 || !std::isfinite(error)) { std::cerr << "Error: " << 100.0*error << "%" << std::endl; return EXIT_FAILURE; } else { |