aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/riscv
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-12-20 13:18:32 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-02-12 16:31:57 -0300
commit95a01ea9551f09c5e6accd07105bac360f2d38e6 (patch)
treee7fdad0a78404c49b4c345699d3d51a61db851e7 /sysdeps/riscv
parent1cd9ccd8c0b23a3106f08f6e29bcbb1f57d3334c (diff)
downloadglibc-95a01ea9551f09c5e6accd07105bac360f2d38e6.zip
glibc-95a01ea9551f09c5e6accd07105bac360f2d38e6.tar.gz
glibc-95a01ea9551f09c5e6accd07105bac360f2d38e6.tar.bz2
math: Use atanpif from CORE-MATH
The CORE-MATH implementation is correctly rounded (for any rounding mode) and shows better performance to the generic atanpif. 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 66.3296 52.7558 20.46% x86_64v2 66.0429 51.4007 22.17% x86_64v3 60.6294 48.7876 19.53% aarch64 (Neoverse) 24.3163 20.9110 14.00% power8 16.5766 13.3620 19.39% power10 16.5115 13.4072 18.80% reciprocal-throughput master patched improvement x86_64 30.8599 16.0866 47.87% x86_64v2 29.2286 15.4688 47.08% x86_64v3 23.0960 12.8510 44.36% aarch64 (Neoverse) 15.4619 10.6752 30.96% power8 7.9200 5.2483 33.73% power10 6.8539 4.6262 32.50% Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'sysdeps/riscv')
-rw-r--r--sysdeps/riscv/nofpu/libm-test-ulps1
-rw-r--r--sysdeps/riscv/rvd/libm-test-ulps4
2 files changed, 0 insertions, 5 deletions
diff --git a/sysdeps/riscv/nofpu/libm-test-ulps b/sysdeps/riscv/nofpu/libm-test-ulps
index f55df65..087dcd7 100644
--- a/sysdeps/riscv/nofpu/libm-test-ulps
+++ b/sysdeps/riscv/nofpu/libm-test-ulps
@@ -126,7 +126,6 @@ ldouble: 4
Function: "atanpi":
double: 2
-float: 1
ldouble: 2
Function: "cabs":
diff --git a/sysdeps/riscv/rvd/libm-test-ulps b/sysdeps/riscv/rvd/libm-test-ulps
index 879f5c5..efd83af 100644
--- a/sysdeps/riscv/rvd/libm-test-ulps
+++ b/sysdeps/riscv/rvd/libm-test-ulps
@@ -166,22 +166,18 @@ ldouble: 4
Function: "atanpi":
double: 2
-float: 1
ldouble: 2
Function: "atanpi_downward":
double: 1
-float: 2
ldouble: 1
Function: "atanpi_towardzero":
double: 1
-float: 2
ldouble: 1
Function: "atanpi_upward":
double: 1
-float: 1
ldouble: 2
Function: "cabs":