aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/fpu
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-12-20 13:25:39 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-02-12 16:31:57 -0300
commitbe85208b9fcaf7d7de7aec074e80177739b89947 (patch)
tree3787320ae1e9d6581845a47a74935823ac796600 /sysdeps/x86_64/fpu
parent95a01ea9551f09c5e6accd07105bac360f2d38e6 (diff)
downloadglibc-be85208b9fcaf7d7de7aec074e80177739b89947.tar.xz
glibc-be85208b9fcaf7d7de7aec074e80177739b89947.zip
math: Use cospif from CORE-MATH
The CORE-MATH implementation is correctly rounded (for any rounding mode) and shows better performance to the generic cospif. 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 47.4679 38.4157 19.07% x86_64v2 46.9686 38.3329 18.39% x86_64v3 43.8929 31.8510 27.43% aarch64 (Neoverse) 18.8867 13.2089 30.06% power8 22.9435 7.8023 65.99% power10 15.4472 7.77505 49.67% reciprocal-throughput master patched improvement x86_64 20.9518 11.4991 45.12% x86_64v2 19.8699 10.5921 46.69% x86_64v3 19.3475 9.3998 51.42% aarch64 (Neoverse) 12.5767 6.2158 50.58% power8 15.0566 3.2654 78.31% power10 9.2866 3.1147 66.46% Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'sysdeps/x86_64/fpu')
-rw-r--r--sysdeps/x86_64/fpu/libm-test-ulps4
1 files changed, 0 insertions, 4 deletions
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index 8c5d4fd471..e2cf3e04b6 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -1050,25 +1050,21 @@ float: 2
Function: "cospi":
double: 2
-float: 2
float128: 2
ldouble: 2
Function: "cospi_downward":
double: 1
-float: 2
float128: 2
ldouble: 2
Function: "cospi_towardzero":
double: 1
-float: 1
float128: 2
ldouble: 2
Function: "cospi_upward":
double: 1
-float: 2
float128: 2
ldouble: 2