about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/e_atan2.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-24 20:19:17 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-24 20:19:17 -0400
commitaf968f62f24c5c0ef4e7e5ab41acae946908c112 (patch)
treee1e0570eeb00c434cc751cbadfbeae150eeea11a /sysdeps/ieee754/dbl-64/e_atan2.c
parent58985aa92f57ff46e96b32388ce65e7fdd8c8b9e (diff)
downloadglibc-af968f62f24c5c0ef4e7e5ab41acae946908c112.tar.gz
glibc-af968f62f24c5c0ef4e7e5ab41acae946908c112.tar.xz
glibc-af968f62f24c5c0ef4e7e5ab41acae946908c112.zip
Optimize accurate 64-bit routines for FMA4 on x86-64
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_atan2.c')
-rw-r--r--sysdeps/ieee754/dbl-64/e_atan2.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_atan2.c b/sysdeps/ieee754/dbl-64/e_atan2.c
index 264791e0f9..9caacccf4c 100644
--- a/sysdeps/ieee754/dbl-64/e_atan2.c
+++ b/sysdeps/ieee754/dbl-64/e_atan2.c
@@ -51,7 +51,11 @@
 /* round to nearest mode of IEEE 754 standard.                          */
 /************************************************************************/
 static double atan2Mp(double ,double ,const int[]);
-static double signArctan2(double ,double);
+  /* Fix the sign and return after stage 1 or stage 2 */
+static double signArctan2(double y,double z)
+{
+  return __copysign(z, y);
+}
 static double normalized(double ,double,double ,double);
 void __mpatan2(mp_no *,mp_no *,mp_no *,int);
 
@@ -375,7 +379,9 @@ double __ieee754_atan2(double y,double x) {
     }
   }
 }
+#ifndef __ieee754_atan2
 strong_alias (__ieee754_atan2, __atan2_finite)
+#endif
 
   /* Treat the Denormalized case */
 static double  normalized(double ax,double ay,double y, double z)
@@ -387,11 +393,6 @@ static double  normalized(double ax,double ay,double y, double z)
   __sub(&mpz,&mperr,&mpz2,p);  __mp_dbl(&mpz2,&z,p);
   return signArctan2(y,z);
 }
-  /* Fix the sign and return after stage 1 or stage 2 */
-static double signArctan2(double y,double z)
-{
-  return ((y<ZERO) ? -z : z);
-}
   /* Stage 3: Perform a multi-Precision computation */
 static double  atan2Mp(double x,double y,const int pr[])
 {