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

math: Use atan2f from CORE-MATH

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

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                      68.1175        69.2014        -1.59%
x86_64v2                    66.9884        66.0081         1.46%
x86_64v3                    57.7034        61.6407        -6.82%
i686                       189.8690        152.7560       19.55%
aarch64 (Neoverse)          32.6151        24.5382        24.76%
power10                     21.7282        17.1896        20.89%

reciprocal-throughput        master        patched   improvement
x86_64                      34.5202        31.6155         8.41%
x86_64v2                    32.6379        30.3372         7.05%
x86_64v3                    34.3677        23.6455        31.20%
i686                       157.7290        75.8308        51.92%
aarch64 (Neoverse)          27.7788        16.2671        41.44%
power10                     15.5715         8.1588        47.60%

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 17:57:31 -03:00
parent a357d6273f
commit 6f9bacf36b
29 changed files with 270 additions and 297 deletions

View File

@ -70,22 +70,18 @@ double: 1
ldouble: 1
Function: "atan2":
float: 2
ldouble: 2
Function: "atan2_downward":
double: 1
float: 2
ldouble: 2
Function: "atan2_towardzero":
double: 1
float: 2
ldouble: 3
Function: "atan2_upward":
double: 1
float: 2
ldouble: 2
Function: "atan_downward":
@ -217,22 +213,18 @@ float: 2
ldouble: 4
Function: "carg":
float: 1
ldouble: 2
Function: "carg_downward":
double: 1
float: 2
ldouble: 2
Function: "carg_towardzero":
double: 1
float: 2
ldouble: 3
Function: "carg_upward":
double: 1
float: 2
ldouble: 2
Function: Real part of "casin":