From 25828746f377b528198efd2ae03c61f25c6e7e20 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 7 May 2018 21:04:31 +0100 Subject: [PATCH] XML precision scientific with 16 digits by default --- lib/serialisation/XmlIO.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/serialisation/XmlIO.h b/lib/serialisation/XmlIO.h index eaa8174b..792505d4 100644 --- a/lib/serialisation/XmlIO.h +++ b/lib/serialisation/XmlIO.h @@ -103,7 +103,8 @@ namespace Grid { std::ostringstream os; - os << std::boolalpha << x; + os.precision(16); + os << std::scientific << std::boolalpha << x; pugi::xml_node leaf = node_.append_child(s.c_str()); leaf.append_child(pugi::node_pcdata).set_value(os.str().c_str()); }