Increase precision for writing floats

This commit is contained in:
Thomas Krijnen
2014-06-07 14:28:30 +02:00
parent 68e60f0586
commit 604358b48e
+3 -1
View File
@@ -17,6 +17,8 @@
* *
********************************************************************************/
#include <iomanip>
#include "../ifcparse/IfcParse.h"
#include "../ifcparse/IfcFile.h"
#include "../ifcparse/IfcWrite.h"
@@ -197,7 +199,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');