summaryrefslogtreecommitdiffstats
path: root/tests/Euler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Euler.cpp')
-rw-r--r--tests/Euler.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/Euler.cpp b/tests/Euler.cpp
index 0a6e28e..62ecee7 100644
--- a/tests/Euler.cpp
+++ b/tests/Euler.cpp
@@ -23,15 +23,16 @@ main()
double expected = std::exp(2.0);
std::cout << std::setprecision(10)
- << "Numerical: " << actual << std::endl
- << "Expected: " << expected << std::endl;
+ << "Numerical: " << actual << std::endl
+ << "Expected: " << expected << std::endl
+ << "iterations: " << integrator.iterations() << std::endl;
double error = std::fabs(expected - actual)/expected;
if (error > 0.01) {
- std::cerr << "Error: " << 100.0*error << "%" << std::endl;
+ std::cerr << "Error: " << 100.0*error << "%" << std::endl;
return EXIT_FAILURE;
} else {
- std::cout << "Error: " << 100.0*error << "%" << std::endl;
+ std::cout << "Error: " << 100.0*error << "%" << std::endl;
return EXIT_SUCCESS;
}
}