Boost C++ Libraries: Ticket #12524: cpp_bin_float: Anal fixation. Part 1. Sign of zero result of summation. https://svn.boost.org/trac10/ticket/12524 <p> IEEE-754 has one simple rule - subtraction of two equal finite numbers results in +0. From here follows that there are only two cases in which subtraction/addition of zeros results in -0: </p> <blockquote> <p> -0 + -0 and -0 - +0. All other combinations results in +0. </p> </blockquote> <p> Also from here follows that subtraction/addition of non-zeros with equal absolute value never results in -0. </p> <p> I see no good reasons why boost::cpp_bin_float should not follow the same conventions. But right now it does not. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12524 Trac 1.4.3 Michael Shatz Thu, 13 Oct 2016 19:51:50 GMT attachment set https://svn.boost.org/trac10/ticket/12524 https://svn.boost.org/trac10/ticket/12524 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">af_p1.cpp</span> </li> </ul> <p> demonstrates non-IEEE sign of zero of cpp_bin_float addition/subtraction </p> Ticket John Maddock Wed, 26 Oct 2016 16:56:49 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/12524#comment:1 https://svn.boost.org/trac10/ticket/12524#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.63.0</span> </li> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/multiprecision/commit/5a5612c0a9c2de934a761b7e090b7c15466b2988"><span class="icon">​</span>https://github.com/boostorg/multiprecision/commit/5a5612c0a9c2de934a761b7e090b7c15466b2988</a>, thanks for the report! </p> Ticket