Boost C++ Libraries: Ticket #12196: cpp_bin_float: convert_to<double> of infinity and NaN returns zero https://svn.boost.org/trac10/ticket/12196 <p> Applying convert_to&lt;double&gt;() to cpp_bin_float object with values of Inf and/or NaN returns 0. That is a new bug in the latest github version. </p> <p> In Version 1.60.0 behavior is also not 100% correct, but better: inf.convert_to&lt;double&gt;() =&gt; 1.79769e+308 nan.convert_to&lt;double&gt;() =&gt; nan </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/12196 Trac 1.4.3 Michael Shatz Thu, 12 May 2016 19:26:17 GMT attachment set https://svn.boost.org/trac10/ticket/12196 https://svn.boost.org/trac10/ticket/12196 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">infcnv_test.cpp</span> </li> </ul> <p> demonstrates mistake in convert_to&lt;double&gt;() of special cpp_bin_float values </p> Ticket John Maddock Sat, 14 May 2016 18:16:10 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12196#comment:1 https://svn.boost.org/trac10/ticket/12196#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> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/multiprecision/commit/6e7e2e801004b328b34e726d80ea815b892952f3"><span class="icon">​</span>https://github.com/boostorg/multiprecision/commit/6e7e2e801004b328b34e726d80ea815b892952f3</a> </p> <p> Thanks for the reports! </p> Ticket