]> git.ipfire.org Git - thirdparty/glibc.git/commit
[PATCH 6/7] sin/cos slow paths: refactor duplicated code into dosin
authorWilco Dijkstra <wdijkstr@arm.com>
Tue, 3 Apr 2018 15:46:10 +0000 (16:46 +0100)
committerFangrui Song <i@maskray.me>
Sat, 28 Aug 2021 00:26:06 +0000 (17:26 -0700)
commitc8aaaf67f69d6a9dc92e8fe18dc5c12362be76ea
tree81e080e5227299a1ef83b9493eb5d62ed6f39122
parentc015f0cc572559a629d675f6e833be95faed7885
[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.
sysdeps/ieee754/dbl-64/s_sin.c