1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00

math: Use atanf from CORE-MATH

The CORE-MATH implementation is correctly rounded (for any rounding mode)
and shows slight better performance to the generic atanf.

The code was adapted to glibc style and to use the definition of
math_config.h (to handle errno, overflow, and underflow).

Benchtest on x64_64 (Ryzen 9 5900X, gcc 14.2.1), aarch64 (Neoverse-N1,
gcc 13.3.1), and powerpc (POWER10, gcc 13.2.1):

Latency                      master        patched   improvement
x86_64                      56.8265        53.6842         5.53%
x86_64v2                    54.8177        53.6842         2.07%
x86_64v3                    46.2915        48.7034        -5.21%
i686                       158.3760        108.9560       31.20%
aarch64 (Neoverse)           21.687        20.5893         5.06%
power10                     13.1903        13.5012        -2.36%

reciprocal-throughput        master        patched   improvement
x86_64                      16.6787        16.7601        -0.49%
x86_64v2                    16.6983        16.7601        -0.37%
x86_64v3                    16.2268        12.1391        25.19%
i686                       138.6840        36.0640        74.00%
aarch64 (Neoverse)          11.8012        10.3565        12.24%
power10                      5.3212         4.2894        19.39%

Signed-off-by: Alexei Sibidanov <sibid@uvic.ca>
Signed-off-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: DJ Delorie <dj@redhat.com>
This commit is contained in:
Adhemerval Zanella
2024-11-18 08:45:16 -03:00
parent ed608a40e2
commit a357d6273f
27 changed files with 125 additions and 226 deletions

View File

@ -51,7 +51,6 @@ double: 3
Function: "atan":
double: 1
float: 1
Function: "atan2":
float: 2
@ -70,15 +69,12 @@ float: 2
Function: "atan_downward":
double: 1
float: 2
Function: "atan_towardzero":
double: 1
float: 1
Function: "atan_upward":
double: 1
float: 2
Function: "atanh":
double: 2

View File

@ -67,7 +67,6 @@ ldouble: 4
Function: "atan":
double: 1
float: 1
ldouble: 1
Function: "atan2":
@ -91,17 +90,14 @@ ldouble: 2
Function: "atan_downward":
double: 1
float: 2
ldouble: 2
Function: "atan_towardzero":
double: 1
float: 1
ldouble: 1
Function: "atan_upward":
double: 1
float: 2
ldouble: 2
Function: "atanh":