From 89cfb10e689c007d376b3e2724d3b83d7bc64bae Mon Sep 17 00:00:00 2001 From: stevenj Date: Mon, 1 Sep 2008 16:04:58 -0400 Subject: [PATCH] only print averages when multiple iterations darcs-hash:20080901200458-c8de0-6caef5668ed83a0897ef492107ee36322d18d1ca.gz --- test/testopt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/testopt.cpp b/test/testopt.cpp index 561c084..98ce278 100644 --- a/test/testopt.cpp +++ b/test/testopt.cpp @@ -195,7 +195,8 @@ static int test_function(int ifunc) return 0; } } - printf("average #evaluations = %g\naverage |f-minf| = %g, max |f-minf| = %g\n", total_count * 1.0 / iterations, total_err / iterations, max_err); + if (iterations > 1) + printf("average #evaluations = %g\naverage |f-minf| = %g, max |f-minf| = %g\n", total_count * 1.0 / iterations, total_err / iterations, max_err); free(x); return 1; -- 2.30.2