| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
| X-Recipient: | djgpp-workers AT delorie DOT com |
| Message-ID: | <4ACBA2AF.8080104@cyberoptics.com> |
| Date: | Tue, 06 Oct 2009 15:03:59 -0500 |
| From: | Eric Rudd <rudd AT cyberoptics DOT com> |
| Organization: | CyberOptics |
| User-Agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
| MIME-Version: | 1.0 |
| To: | djgpp-workers AT delorie DOT com |
| Subject: | Re: atan2 bug |
| References: | <200909142122 DOT 34236 DOT juan DOT guerrero AT gmx DOT de> <83y6ohxos6 DOT fsf AT gnu DOT org> <200909150025 DOT 37854 DOT juan DOT guerrero AT gmx DOT de> |
| In-Reply-To: | <200909150025.37854.juan.guerrero@gmx.de> |
| X-Spam-Status: | No, hits=-102.0 required=5.0 |
| tests=EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES,REPLY_WITH_QUOTES, | |
| USER_AGENT,USER_IN_WHITELIST | |
| version=2.55 | |
| X-Spam-Level: | |
| X-Spam-Checker-Version: | SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) |
| Reply-To: | djgpp-workers AT delorie DOT com |
Juan Manuel Guerrero wrote: > - jnz badarg > - movl 4(%esp), %eax > + jne badarg /* x = NaN */ > + movl 12(%esp), %eax I wrote this routine many years ago, so I thought I would be in a good position to examine the proposed changes. When I ran the original code for atan2(3, +inf), it actually produced the correct answer, but after inspecting the code, I see that there actually *is* a bug, and that the correct result I got was because the value at 4(%esp) just happened to be zero on my platform. I agree with the changes proposed. Unfortunately, if we want the code to conform to C99, most of these exception tests should be removed. -Eric Rudd
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |