Boost C++ Libraries: Ticket #12581: cpp_bin_float: Anal fixation. Part 4. Special cases of atan2() https://svn.boost.org/trac10/ticket/12581 <p> In following special cases boost::atan2(y, x) return values are different from C RTL: </p> <pre class="wiki"> y x C RTL boost inf inf pi/4 nan -inf inf -pi/4 nan inf -inf 3*pi/4 nan -inf -inf -3*pi/4 nan -0 -val -pi pi 0 nan nan 0 inf nan nan pi/2 -inf nan nan -pi/2 </pre><p> The first four boost answer make sense. IMHO, they are better than C RTL answers. The fifth boost answer is strange, but can be considered acceptable. The rest are plain bugs - nan should always propagate. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12581 Trac 1.4.3 Michael Shatz Fri, 04 Nov 2016 01:52:38 GMT attachment set https://svn.boost.org/trac10/ticket/12581 https://svn.boost.org/trac10/ticket/12581 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">af_p4.cpp</span> </li> </ul> <p> demonstrates boost atan2() behavior that differs from C RTL </p> Ticket John Maddock Wed, 30 Nov 2016 19:02:50 GMT <link>https://svn.boost.org/trac10/ticket/12581#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12581#comment:1</guid> <description> <p> This is basically fixed in this giant commit which tries to bring all the functions into line with C99 annex F: <a class="ext-link" href="https://github.com/boostorg/multiprecision/commit/138a9055e2edc68dca2e78ff97ffe6276c17fa0a"><span class="icon">​</span>https://github.com/boostorg/multiprecision/commit/138a9055e2edc68dca2e78ff97ffe6276c17fa0a</a> </p> <p> I might need to do some more work on this, especially for types other than cpp_bin_float. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 02 Dec 2016 17:55:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12581#comment:2 https://svn.boost.org/trac10/ticket/12581#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> See also <a class="ext-link" href="https://github.com/boostorg/multiprecision/commit/138a9055e2edc68dca2e78ff97ffe6276c17fa0a"><span class="icon">​</span>https://github.com/boostorg/multiprecision/commit/138a9055e2edc68dca2e78ff97ffe6276c17fa0a</a> </p> <p> I hoping this is fixed now. </p> Ticket