Boost C++ Libraries: Ticket #8145: multiprecision, negative integer zero https://svn.boost.org/trac10/ticket/8145 <p> Here is me again :) </p> <p> Introduced in revision 83080: </p> <pre class="wiki"> #include &lt;iostream&gt; #include &lt;boost/multiprecision/cpp_int.hpp&gt; using boost::multiprecision::cpp_int; int main() { cpp_int c = -1 + cpp_int(0) + 1; if( c != 0 ) std::cout &lt;&lt; c; // c = -0 return 0; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8145 Trac 1.4.3 John Maddock Sat, 23 Feb 2013 13:36:17 GMT <link>https://svn.boost.org/trac10/ticket/8145#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8145#comment:1</guid> <description> <p> Confirmed, many thanks for keeping me on my toes with these!! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sat, 23 Feb 2013 17:22:21 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8145#comment:2 https://svn.boost.org/trac10/ticket/8145#comment:2 <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> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83103" title="Fix bug in subtraction routine that leads to -0 rather than 0. Add ...">[83103]</a>) Fix bug in subtraction routine that leads to -0 rather than 0. Add test cases. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8145" title="#8145: Bugs: multiprecision, negative integer zero (closed: fixed)">#8145</a>. </p> Ticket