Precision fixes

This commit is contained in:
aothms
2015-11-30 22:59:21 +01:00
parent fdf1b29682
commit bf292cccd0
2 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -19,6 +19,7 @@
#include <iomanip>
#include <locale>
#include <limits>
#include <boost/algorithm/string.hpp>
@@ -327,7 +328,7 @@ private:
std::string format_double(const double& d) {
std::ostringstream oss;
oss.imbue(std::locale::classic());
oss << std::setprecision(15) << d;
oss << std::setprecision(std::numeric_limits<double>::digits10) << d;
const std::string str = oss.str();
oss.str("");
std::string::size_type e = str.find('e');