From bd6530b5d5e029a91df1273bfcc36aa129e9d3f8 Mon Sep 17 00:00:00 2001 From: Edward Brown <edward.brown@stfc.ac.uk> Date: Fri, 16 Feb 2018 15:09:51 +0000 Subject: [PATCH] Re #21749: Use maximum precision when converting to string. --- Framework/Geometry/inc/MantidGeometry/Instrument/Parameter.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/Parameter.h b/Framework/Geometry/inc/MantidGeometry/Instrument/Parameter.h index 18c9254403b..3bb8732ab73 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/Parameter.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/Parameter.h @@ -10,6 +10,7 @@ #include <typeinfo> #include <vector> #include <stdexcept> +#include <iomanip> namespace Mantid { @@ -185,6 +186,7 @@ template <class T> void Parameter::set(const T &t) { */ template <class Type> std::string ParameterType<Type>::asString() const { std::ostringstream str; + str << std::setprecision(std::numeric_limits<Type>::digits10); str << m_value; return str.str(); } -- GitLab