From: Andreas Schwab Date: Mon, 16 Mar 1998 01:56:16 +0000 (+0000) Subject: * sysdeps/m68k/fpu/__math.h (__ieee754_atan2): Reorder conditions X-Git-Tag: cvs/before-sparc-2_0_x-branch~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d06784bd4aa90b9e84f21d62905ef41c7df4e40;p=thirdparty%2Fglibc.git * sysdeps/m68k/fpu/__math.h (__ieee754_atan2): Reorder conditions to handle x = 0 or y = 0 correctly. --- diff --git a/ChangeLog b/ChangeLog index a989125f3a9..db16a1d4c4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Mar 16 10:49:57 1998 Andreas Schwab + + * sysdeps/m68k/fpu/__math.h (__ieee754_atan2): Reorder conditions + to handle x = 0 or y = 0 correctly. + 1998-03-14 Ulrich Drepper * string/tester.c (main): Update strsep tests from 2.1. diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index 82ec88fa76e..2d4f1eb8970 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -166,19 +166,19 @@ __m81_defun (float_type, __CONCAT(__ieee754_atan2,s), \ } \ else \ { \ - if (__y > 0) \ + if (__y < 0) \ { \ - if (-__x < __y) \ - return __pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \ + if (-__x > -__y) \ + return -__pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \ else \ - return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ + return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ } \ else \ { \ - if (-__x > -__y) \ - return -__pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \ + if (-__x > __y) \ + return __pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \ else \ - return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ + return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \ } \ } \ } \