diff options
author | Pjotr Prins | 2020-09-28 10:16:59 +0100 |
---|---|---|
committer | Pjotr Prins | 2020-09-28 10:16:59 +0100 |
commit | 55d19a2dccc0227dcf02eb55733eada1a34f382a (patch) | |
tree | 76023ced1b5e19641579dcd552f8b4b12880b14c | |
parent | 210a8ec0746dc0606c1319d3ad2d5bcd7ae66429 (diff) | |
download | pangemma-55d19a2dccc0227dcf02eb55733eada1a34f382a.tar.gz |
Show precision
-rw-r--r-- | src/debug.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 <ctime> #include <fstream> #include <iostream> +#include <iomanip> #include <string> #include <sys/stat.h> #include <vector> @@ -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) { |