Boost C++ Libraries: Ticket #12512: cpp_bin_float: convert_to<double> for numbers with absolute values smaller than 2**(INT_MIN+52) returns infinity instead of 0. https://svn.boost.org/trac10/ticket/12512 <p> Applying convert_to&lt;double&gt;() to cpp_bin_float object with absolute values in range (0..2<strong>(INT_MIN+52)] returns infinity. Similar bug exists with convert_to&lt;double&gt;(). Due to limits on exponent of cpp_bin_float the bug can be seen only when class Exponent = int64_t or wider. </strong></p> <p> Platform: Mingw, gcc 5.3.0, x64. All optimization levels. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12512 Trac 1.4.3 Michael Shatz Mon, 10 Oct 2016 19:52:21 GMT attachment set https://svn.boost.org/trac10/ticket/12512 https://svn.boost.org/trac10/ticket/12512 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">cnv_under_test.cpp</span> </li> </ul> <p> demonstrates cpp_bin_float convert_to&lt;&gt; bug </p> Ticket Michael Shatz Tue, 11 Oct 2016 10:07:29 GMT <link>https://svn.boost.org/trac10/ticket/12512#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12512#comment:1</guid> <description> <p> Your posting engine changed my post above in unexpected way. I think, it would be beneficiary for non-sophisticated people like me, if by default you engine will have <a class="wiki" href="https://svn.boost.org/trac10/wiki/WikiFormatting">WikiFormatting</a> turned off. An option to turn it on can be provided for those of us who know what they are doing. </p> <p> I meant to post: </p> <p> Applying convert_to&lt;double&gt;() to cpp_bin_float object with absolute values in range (0..2**(INT_MIN+52)] returns infinity.<br /> Similar bug exists with convert_to&lt;float&gt;().<br /> Due to limits on exponent of cpp_bin_float the bug can be seen only when class Exponent = int64_t or wider. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 24 Oct 2016 17:49:01 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/12512#comment:2 https://svn.boost.org/trac10/ticket/12512#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> <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> Confirmed, fixed in <a class="ext-link" href="https://github.com/boostorg/multiprecision/commit/ef0ef9b515aa63c80b71863dc0992261acdd82b9"><span class="icon">​</span>https://github.com/boostorg/multiprecision/commit/ef0ef9b515aa63c80b71863dc0992261acdd82b9</a>. </p> Ticket