Boost C++ Libraries: Ticket #12090: cpp_dec_float has broken infinity https://svn.boost.org/trac10/ticket/12090 <p> output of following program should be "inf", but instead is "-14". </p> <p> #include &lt;iostream&gt; #include &lt;boost/multiprecision/cpp_dec_float.hpp&gt; typedef boost::multiprecision::number&lt; boost::multiprecision::cpp_dec_float&lt; 30, boost::int16_t &gt; &gt; money_t; int main( int argc, char * * argv ) { </p> <blockquote> <p> money_t a( 7 ); money_t b( 7 ); std::cout &lt;&lt; std::numeric_limits&lt; money_t &gt;::infinity( ) - ( a + b ) &lt;&lt; std::endl; return 0; </p> </blockquote> <p> } </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12090 Trac 1.4.3 scottopoly@… Tue, 22 Mar 2016 21:58:00 GMT cc set https://svn.boost.org/trac10/ticket/12090#comment:1 https://svn.boost.org/trac10/ticket/12090#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">scottopoly@…</span> added </li> </ul> Ticket John Maddock Thu, 24 Mar 2016 19:09:37 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12090#comment:2 https://svn.boost.org/trac10/ticket/12090#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> Confirmed, fixed in <a class="ext-link" href="https://github.com/boostorg/multiprecision/commit/c4e847b9fdc70547033e7dd56cf0d088ed737b84"><span class="icon">​</span>https://github.com/boostorg/multiprecision/commit/c4e847b9fdc70547033e7dd56cf0d088ed737b84</a> </p> Ticket