Boost C++ Libraries: Ticket #12227: cpp_bin_float: sqrt(+inf) inconsistent with IEEE-754 https://svn.boost.org/trac10/ticket/12227 <p> cpp_bin_float sqrt(+inf) returns NaN. IEEE-754 appears to recommend +inf which is also the most logical result. The requirement is not very clear from the wording of Standard, but asked a member of committee and he has no doubt that it was an intention. </p> <p> It's not a bug, because cpp_bin_float was never advertised as fully compliant with IEEE-754, but I see no reason why it can't be as close as possible to IEEE binary floating point. Especially in cases like that where consistency with IEEE is almost free in terms of performance. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12227 Trac 1.4.3 John Maddock Mon, 06 Jun 2016 12:19:32 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/12227#comment:1 https://svn.boost.org/trac10/ticket/12227#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.62.0</span> </li> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/multiprecision/commit/9c7210e85918ae29ef06a7162d3e7435a73100ab"><span class="icon">​</span>https://github.com/boostorg/multiprecision/commit/9c7210e85918ae29ef06a7162d3e7435a73100ab</a> </p> <p> Thanks! </p> <p> Aside: it seems wrong to me that sqrt(numeric_limits&lt;&gt;::max() + 1) is infinity, but never mind... </p> Ticket