summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/dbl-64/s_sincos.c
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2018-04-03 16:28:03 +0100
committerWilco Dijkstra <wdijkstr@arm.com>2018-04-03 16:52:17 +0100
commit7a5640f23a797d3be38a78fb899903699c3aa5a0 (patch)
tree5d0dc9164a8001312f3211fd88b646399adcc4c7 /sysdeps/ieee754/dbl-64/s_sincos.c
parent19a8b9a300f2f1f0012aff0f2b70b09430f50d9e (diff)
downloadglibc-7a5640f23a797d3be38a78fb899903699c3aa5a0.tar.gz
[PATCH 2/7] sin/cos slow paths: remove large range reduction
This patch removes the large range reduction code and defers to the huge range reduction code. The first level range reducer supports inputs up to 2^27, which is way too large given that inputs for sin/cos are typically small (< 10), and optimizing for a smaller range would give a significant speedup. Input values above 2^27 are practically never used, so there is no reason for supporting range reduction between 2^27 and 2^48. Removing it significantly simplifies code and enables further speedups. There is about a 2.3x slowdown in this range due to __branred being extremely slow (a better algorithm could easily more than double performance). * sysdeps/ieee754/dbl-64/s_sin.c (reduce_sincos_2): Remove function. (do_sincos_2): Likewise. (__sin): Remove middle range reduction case. (__cos): Likewise. * sysdeps/ieee754/dbl-64/s_sincos.c (__sincos): Remove middle range reduction case.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_sincos.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_sincos.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_sincos.c b/sysdeps/ieee754/dbl-64/s_sincos.c
index e1977ea7e9..a9af8ce526 100644
--- a/sysdeps/ieee754/dbl-64/s_sincos.c
+++ b/sysdeps/ieee754/dbl-64/s_sincos.c
@@ -86,16 +86,6 @@ __sincos (double x, double *sinx, double *cosx)
return;
}
- if (k < 0x42F00000)
- {
- double a, da;
- int4 n = reduce_sincos_2 (x, &a, &da);
-
- *sinx = do_sincos_2 (a, da, x, n, false);
- *cosx = do_sincos_2 (a, da, x, n, true);
-
- return;
- }
if (k < 0x7ff00000)
{
reduce_and_compute_sincos (x, sinx, cosx);