diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-06-10 01:05:23 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-06-10 01:05:23 -0600 |
commit | d03ab99aa999544403652e0739c9bea3b8b7835e (patch) | |
tree | 6a470b04590652a6624e36771ff89894f9a761b1 /tests/Complex.cpp | |
parent | d4560540b80ac1a05c86812c51119ed08f01de9d (diff) | |
download | vz-d03ab99aa999544403652e0739c9bea3b8b7835e.tar.xz |
Test for NaNs in results.
Diffstat (limited to 'tests/Complex.cpp')
-rw-r--r-- | tests/Complex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/Complex.cpp b/tests/Complex.cpp index 3d290c0..a81deeb 100644 --- a/tests/Complex.cpp +++ b/tests/Complex.cpp @@ -53,7 +53,7 @@ main() << "Rejections: " << integrator.rejections() << std::endl; double error = std::abs(expected - actual)/std::abs(expected); - if (error > 6.0e-7) { + if (error > 6.0e-7 || !std::isfinite(error)) { std::cerr << "Error: " << 100.0*error << "%" << std::endl; return EXIT_FAILURE; } else { |