From 55d19a2dccc0227dcf02eb55733eada1a34f382a Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 28 Sep 2020 10:16:59 +0100 Subject: Show precision --- src/debug.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/debug.cpp b/src/debug.cpp index 1014d6e..3b92131 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -162,7 +163,7 @@ void write(const char *s, const char *msg) { void write(const double d, const char *msg) { if (!is_debug_data_mode()) return; - cout << d << ": " << msg << endl; + cout << std::setprecision(3) << d << ": " << msg << endl; } void write(const gsl_vector *v, const char *msg) { -- cgit v1.2.3