Improve performance of sinf and cosf
commit599cf3976679e1b345307d9c02057f02aa95528f
authorWilco Dijkstra <wdijkstr@arm.com>
Tue, 14 Aug 2018 09:45:59 +0000 (14 10:45 +0100)
committerWilco Dijkstra <wdijkstr@arm.com>
Tue, 14 Aug 2018 09:45:59 +0000 (14 10:45 +0100)
treeede9ff73c0eb51bce1a9c540b6daf5c0675b5afd
parente95c6f61920a0f9237cfb292fa44ad500e1df09b
Improve performance of sinf and cosf

The second patch improves performance of sinf and cosf using the same
algorithms and polynomials.  The returned values are identical to sincosf
for the same input.  ULP definitions for AArch64 and x64 are updated.

sinf/cosf througput gains on Cortex-A72:
* |x| < 0x1p-12 : 1.2x
* |x| < M_PI_4  : 1.8x
* |x| < 2 * M_PI: 1.7x
* |x| < 120.0   : 2.3x
* |x| < Inf     : 3.0x

* NEWS: Mention sinf, cosf, sincosf.
* sysdeps/aarch64/libm-test-ulps: Update ULP for sinf, cosf, sincosf.
* sysdeps/x86_64/fpu/libm-test-ulps: Update ULP for sinf and cosf.
* sysdeps/x86_64/fpu/multiarch/s_sincosf-fma.c: Add definitions of
constants rather than including generic sincosf.h.
* sysdeps/x86_64/fpu/s_sincosf_data.c: Remove.
* sysdeps/ieee754/flt-32/s_cosf.c (cosf): Rewrite.
* sysdeps/ieee754/flt-32/s_sincosf.h (reduced_sin): Remove.
(reduced_cos): Remove.
(sinf_poly): New function.
* sysdeps/ieee754/flt-32/s_sinf.c (sinf): Rewrite.
ChangeLog
NEWS
sysdeps/aarch64/libm-test-ulps
sysdeps/ieee754/flt-32/s_cosf.c
sysdeps/ieee754/flt-32/s_sincosf.h
sysdeps/ieee754/flt-32/s_sinf.c
sysdeps/x86_64/fpu/libm-test-ulps
sysdeps/x86_64/fpu/multiarch/s_sincosf-fma.c
sysdeps/x86_64/fpu/s_sincosf_data.c [deleted file]