Boost C++ Libraries: Ticket #10188: Loses floating point precision on round trip https://svn.boost.org/trac10/ticket/10188 <p> ptrees stream_translator uses a precision of std::numeric_limits&lt;F&gt;::digits10 + 1 when converting floating point values. This is not always enough, and a more correct value would be digits10+2 or max_digits10 (c++11 only). See <a class="reopened ticket" href="https://svn.boost.org/trac10/ticket/9177" title="#9177: Bugs: Improved serialization of floating point values (reopened)">ticket:9177</a> for a similar issue. </p> <p> The attached test produces the following output pre-patch: </p> <pre class="wiki">in : -1.8312345000098765e-08 out: -1.8312345000098762e-08 Wrong </pre><p> and after patch: </p> <pre class="wiki">in : -1.8312345000098765e-08 out: -1.8312345000098765e-08 Right </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10188 Trac 1.4.3 Magne OEstlyngen <magne+boost@…> Thu, 10 Jul 2014 13:56:38 GMT attachment set https://svn.boost.org/trac10/ticket/10188 https://svn.boost.org/trac10/ticket/10188 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.cpp</span> </li> </ul> <p> Test-case showing the problem </p> Ticket Magne OEstlyngen <magne+boost@…> Thu, 10 Jul 2014 13:57:07 GMT attachment set https://svn.boost.org/trac10/ticket/10188 https://svn.boost.org/trac10/ticket/10188 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">ptree_precision.patch</span> </li> </ul> <p> Patch fixing the problem </p> Ticket Sebastian Redl Fri, 23 Jan 2015 12:25:23 GMT status changed https://svn.boost.org/trac10/ticket/10188#comment:1 https://svn.boost.org/trac10/ticket/10188#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Fixed on develop by commit <a class="missing ticket">#4034703</a>. </p> Ticket