]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/m68k/fpu/__math.h (__ieee754_atan2): Reorder conditions
authorAndreas Schwab <schwab@suse.de>
Mon, 16 Mar 1998 01:56:16 +0000 (01:56 +0000)
committerAndreas Schwab <schwab@suse.de>
Mon, 16 Mar 1998 01:56:16 +0000 (01:56 +0000)
to handle x = 0 or y = 0 correctly.

ChangeLog
sysdeps/m68k/fpu/__math.h

index a989125f3a98e097e0e0b21ed13291a80866ea84..db16a1d4c4b9ac3f52515ad88a60aeaea729e7ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 16 10:49:57 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * sysdeps/m68k/fpu/__math.h (__ieee754_atan2): Reorder conditions
+       to handle x = 0 or y = 0 correctly.
+
 1998-03-14  Ulrich Drepper  <drepper@cygnus.com>
 
        * string/tester.c (main): Update strsep tests from 2.1.
index 82ec88fa76ebb056a268c2e19916387d87bdc893..2d4f1eb89701a8555b303d289aa245a5a4e2858d 100644 (file)
@@ -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);         \
        }                                                                    \
     }                                                                       \
 }                                                                           \