Increase precision for writing floats

This commit is contained in:
Thomas Krijnen
2014-06-11 10:24:11 +00:00
parent 83b6ce9083
commit d45056f9c5
+3 -1
View File
@@ -17,6 +17,8 @@
* *
********************************************************************************/
#include <iomanip>
#include "../ifcparse/IfcParse.h"
#include "../ifcparse/IfcWrite.h"
#include "../ifcparse/IfcWritableEntity.h"
@@ -211,7 +213,7 @@ private:
// REAL = [ SIGN ] DIGIT { DIGIT } "." { DIGIT } [ "E" [ SIGN ] DIGIT { DIGIT } ] .
std::string format_double(const double& d) {
std::ostringstream oss;
oss << d;
oss << std::setprecision(16) << d;
const std::string str = oss.str();
oss.str("");
std::string::size_type e = str.find('e');