[PATCH 6/7] sin/cos slow paths: refactor duplicated code into dosin
commitaef3e2558a0ab0aff6d80f3e99ebe228321ab4b3
authorWilco Dijkstra <wdijkstr@arm.com>
Tue, 3 Apr 2018 15:46:10 +0000 (3 16:46 +0100)
committerWilco Dijkstra <wdijkstr@arm.com>
Tue, 3 Apr 2018 15:52:17 +0000 (3 16:52 +0100)
treef0ec1691f868efcb353793d3e6055b1692a63717
parent72f6e9a3e34e2be76fd9a18ea1a427e7a713465e
[PATCH 6/7] sin/cos slow paths: refactor duplicated code into dosin

Refactor duplicated code into do_sin.  Since all calls to do_sin use copysign to
set the sign of the result, move it inside do_sin.  Small inputs use a separate
polynomial, so move this into do_sin as well (the check is based on the more
conservative case when doing large range reduction, but could be relaxed).

* sysdeps/ieee754/dbl-64/s_sin.c (do_sin): Use TAYLOR_SIN for small
inputs.  Return correct sign.
(do_sincos): Remove small input check before do_sin, let do_sin set
the sign.
(__sin): Likewise.
(__cos): Likewise.
ChangeLog
sysdeps/ieee754/dbl-64/s_sin.c