about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/s_sincosl.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-15 18:26:25 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-15 18:26:25 +0000
commit3fe4dc4156af9255fe86b5040c2538e9d7f5459d (patch)
tree41035dba0db535ec39ee7b746c96e05958274dc4 /sysdeps/ieee754/ldbl-128/s_sincosl.c
parent446d213c35105852d345b7cc72d71dd65d15d8ef (diff)
downloadglibc-3fe4dc4156af9255fe86b5040c2538e9d7f5459d.tar.gz
glibc-3fe4dc4156af9255fe86b5040c2538e9d7f5459d.tar.xz
glibc-3fe4dc4156af9255fe86b5040c2538e9d7f5459d.zip
Update.
1999-07-15  Jakub Jelinek  <jj@ultra.linux.cz>

	* math/Makefile: Add t_sincosl and k_sincosl support routines.
	* math/math_private.h (__kernel_sincosl): New declaration.
	* sysdeps/generic/t_sincosl.c: New file.
	* sysdeps/generic/k_sincosl.c: New file.
	* sysdeps/ieee754/ldbl-128/k_cosl.c: New file.
	* sysdeps/ieee754/ldbl-128/k_sinl.c: New file.
	* sysdeps/ieee754/ldbl-128/k_sincosl.c: New file.
	* sysdeps/ieee754/ldbl-128/t_sincosl.c: New file.
	* sysdeps/ieee754/ldbl-128/e_rem_pio2l.c: New file.
	* sysdeps/ieee754/ldbl-128/s_sincosl.c (__sincosl): Use
	__kernel_sincosl.
	* sysdeps/ieee754/ldbl-128/math_ldbl.h (GET_LDOUBLE_LSW64): New
	definition.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_sincosl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_sincosl.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_sincosl.c b/sysdeps/ieee754/ldbl-128/s_sincosl.c
index 2d74e72a50..623b3b5245 100644
--- a/sysdeps/ieee754/ldbl-128/s_sincosl.c
+++ b/sysdeps/ieee754/ldbl-128/s_sincosl.c
@@ -23,9 +23,6 @@
 
 #include "math_private.h"
 
-/* Note: We should probably introduce __kernel_sincosl to speed things up,
-   because __kernel_{cos,sin}l sometimes compute both sine and cosine.  */
-
 void
 __sincosl (long double x, long double *sinx, long double *cosx)
 {
@@ -37,10 +34,7 @@ __sincosl (long double x, long double *sinx, long double *cosx)
   /* |x| ~< pi/4 */
   ix &= 0x7fffffffffffffffLL;
   if (ix <= 0x3ffe921fb54442d1LL)
-    {
-      *sinx = __kernel_sinl (x, 0.0, 0);
-      *cosx = __kernel_cosl (x, 0.0);
-    }
+    __kernel_sincosl (x, 0.0L, sinx, cosx, 0);
   else if (ix >= 0x7fff000000000000LL)
     {
       /* sin(Inf or NaN) is NaN */
@@ -56,20 +50,20 @@ __sincosl (long double x, long double *sinx, long double *cosx)
       switch (n & 3)
 	{
 	case 0:
-	  *sinx = __kernel_sinl (y[0], y[1], 1);
-	  *cosx = __kernel_cosl (y[0], y[1]);
+	  __kernel_sincosl (y[0], y[1], sinx, cosx, 1);
 	  break;
 	case 1:
-	  *sinx = __kernel_cosl (y[0], y[1]);
-	  *cosx = -__kernel_sinl (y[0], y[1], 1);
+	  __kernel_sincosl (y[0], y[1], cosx, sinx, 1);
+	  *cosx = -*cosx;
 	  break;
 	case 2:
-	  *sinx = -__kernel_sinl (y[0], y[1], 1);
-	  *cosx = -__kernel_cosl (y[0], y[1]);
+	  __kernel_sincosl (y[0], y[1], sinx, cosx, 1);
+	  *sinx = -*sinx;
+	  *cosx = -*cosx;
 	  break;
 	default:
-	  *sinx = -__kernel_cosl (y[0], y[1]);
-	  *cosx = __kernel_sinl (y[0], y[1], 1);
+	  __kernel_sincosl (y[0], y[1], cosx, sinx, 1);
+	  *sinx = -*sinx;
 	  break;
 	}
     }