]> sourceware.org Git - glibc.git/commit
[PATCH 3/7] sin/cos slow paths: remove slow paths from small range reduction
authorWilco Dijkstra <wdijkstr@arm.com>
Tue, 3 Apr 2018 15:33:13 +0000 (16:33 +0100)
committerWilco Dijkstra <wdijkstr@arm.com>
Tue, 3 Apr 2018 15:52:17 +0000 (16:52 +0100)
commitd9469deb14ba6f55bd8af1652951ab306a8f63bd
tree4895dc56315753c3960ae3f35ade2e03224db92d
parent7a5640f23a797d3be38a78fb899903699c3aa5a0
[PATCH 3/7] sin/cos slow paths: remove slow paths from small range reduction

This patch improves the accuracy of the range reduction.  When the input is
large (2^27) and very close to a multiple of PI/2, using 110 bits of PI is not
enough.  Improve range reduction accuracy to 136 bits.  As a result the special
checks for results close to zero can be removed.  The ULP of the polynomials is
at worst 0.55ULP, so there is no reason for the slow functions, and they can be
removed.

* sysdeps/ieee754/dbl-64/s_sin.c (reduce_sincos_1): Rename to
reduce_sincos, improve accuracy to 136 bits.
(do_sincos_1): Rename to do_sincos, remove fallbacks to slow functions.
(__sin): Use improved reduction and simplified do_sincos calculation.
(__cos): Likewise.
* sysdeps/ieee754/dbl-64/s_sincos.c (__sincos): Likewise.
ChangeLog
sysdeps/ieee754/dbl-64/s_sin.c
sysdeps/ieee754/dbl-64/s_sincos.c
This page took 0.042703 seconds and 5 git commands to generate.