From c1b8597ecc7832af992bb292457211a2efcf41fe Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Wed, 28 Jan 2015 17:20:51 +0000 Subject: [PATCH] AsciiFile: double precision writing --- lib/AsciiFile.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/AsciiFile.cpp b/lib/AsciiFile.cpp index 25260fc..08edad6 100644 --- a/lib/AsciiFile.cpp +++ b/lib/AsciiFile.cpp @@ -55,12 +55,15 @@ AsciiFile::~AsciiFile(void) // access ////////////////////////////////////////////////////////////////////// void AsciiFile::save(const DMat &m, const std::string &name) { + const auto defaultPrec = fileStream_.precision(defaultDoublePrec); + checkWritability(); isParsed_ = false; fileStream_ << "#L latan_begin mat " << name << endl; fileStream_ << m.cols() << endl; fileStream_ << scientific << m << endl; fileStream_ << "#L latan_end mat " << endl; + fileStream_.precision(defaultPrec); } void AsciiFile::save(const DMatSample &s, const std::string &name)