Boost C++ Libraries: Ticket #12133: cpp_dec_float should compare to precision https://svn.boost.org/trac10/ticket/12133 <p> See this accepted answer for a method to compare two cpp_dec_float's *without* including the guard digits in the comparison. Specifically see the second comment on the answer by "namezero". </p> <p> <a class="ext-link" href="http://stackoverflow.com/a/27381898"><span class="icon">​</span>http://stackoverflow.com/a/27381898</a> </p> <p> (I find myself about to implement similar "epsilon" logic) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12133 Trac 1.4.3 John Maddock Sun, 05 Jun 2016 18:21:51 GMT cc set https://svn.boost.org/trac10/ticket/12133#comment:1 https://svn.boost.org/trac10/ticket/12133#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">e_float@…</span> added </li> </ul> <p> This is one for Christopher Kormanyos to answer really... but my guess is "by design". </p> <p> Ideally we would have a true decimal type that rounded correctly... but it's hard to do both correctly and efficiently. </p> Ticket