aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/dbl-64/s_sin.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh.poyarekar@linaro.org>2015-12-21 10:40:32 +0530
committerSiddhesh Poyarekar <siddhesh.poyarekar@linaro.org>2015-12-21 10:40:32 +0530
commita045832debe4191bcffed6e539a5470152e9c9e8 (patch)
tree024e6228fb366370a19096a689698c9dbe102932 /sysdeps/ieee754/dbl-64/s_sin.c
parent760c2eb7da879e05252468a512a582a0e5c180af (diff)
downloadglibc-a045832debe4191bcffed6e539a5470152e9c9e8.zip
glibc-a045832debe4191bcffed6e539a5470152e9c9e8.tar.gz
glibc-a045832debe4191bcffed6e539a5470152e9c9e8.tar.bz2
Consolidate range reduction in sincos for x > 281474976710656
Range reduction needs to be done only once for sin and cos, so copy over all of the relevant functions (__sin, __cos, reduce_and_compute) and consolidate common code.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_sin.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_sin.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c
index a635a86..b619905 100644
--- a/sysdeps/ieee754/dbl-64/s_sin.c
+++ b/sysdeps/ieee754/dbl-64/s_sin.c
@@ -497,6 +497,7 @@ __sin (double x)
}
} /* else if (k < 0x42F00000 ) */
+#ifndef IN_SINCOS
/* -----------------281474976710656 <|x| <2^1024----------------------------*/
else if (k < 0x7ff00000)
retval = reduce_and_compute (x, 0);
@@ -508,6 +509,7 @@ __sin (double x)
__set_errno (EDOM);
retval = x / x;
}
+#endif
return retval;
}
@@ -729,6 +731,7 @@ __cos (double x)
}
} /* else if (k < 0x42F00000 ) */
+#ifndef IN_SINCOS
/* 281474976710656 <|x| <2^1024 */
else if (k < 0x7ff00000)
retval = reduce_and_compute (x, 1);
@@ -739,6 +742,7 @@ __cos (double x)
__set_errno (EDOM);
retval = x / x; /* |x| > 2^1024 */
}
+#endif
return retval;
}