about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/s_sincos.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_sincos.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_sincos.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_sincos.c b/sysdeps/ieee754/dbl-64/s_sincos.c
index f50ffa625f..7f78b4106f 100644
--- a/sysdeps/ieee754/dbl-64/s_sincos.c
+++ b/sysdeps/ieee754/dbl-64/s_sincos.c
@@ -69,12 +69,22 @@ __sincos (double x, double *sinx, double *cosx)
   u.x = x;
   k = 0x7fffffff & u.i[HIGH_HALF];
 
-  if (k < 0x42F00000)
+  if (k < 0x419921FB)
     {
       *sinx = __sin_local (x);
       *cosx = __cos_local (x);
       return;
     }
+  if (k < 0x42F00000)
+    {
+      double a, da;
+      int4 n = reduce_sincos_2 (x, &a, &da);
+
+      *sinx = do_sincos_2 (a, da, x, n, 0);
+      *cosx = do_sincos_2 (a, da, x, n, 1);
+
+      return;
+    }
   if (k < 0x7ff00000)
     {
       reduce_and_compute_sincos (x, sinx, cosx);