From 7cfd8b56982a88511e62241346b23d611f822793 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 19 Nov 2024 13:31:14 -0300 Subject: math: Use atanhf from CORE-MATH The CORE-MATH implementation is correctly rounded (for any rounding mode) and shows slight better performance to the generic atanhf. 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 59.4930 45.8568 22.92% x86_64v2 59.5705 45.5804 23.48% x86_64v3 53.1838 37.7155 29.08% i686 169.354 133.5940 21.12% aarch64 (Neoverse) 26.0781 16.9829 34.88% power10 15.6591 10.7623 31.27% reciprocal-throughput master patched improvement x86_64 23.5903 18.5766 21.25% x86_64v2 22.6489 18.2683 19.34% x86_64v3 19.0401 13.9474 26.75% i686 97.6034 107.3260 -9.96% aarch64 (Neoverse) 15.3664 9.57846 37.67% power10 6.8877 4.6242 32.86% Signed-off-by: Alexei Sibidanov Signed-off-by: Paul Zimmermann Signed-off-by: Adhemerval Zanella Reviewed-by: DJ Delorie --- sysdeps/or1k/fpu/libm-test-ulps | 4 ---- sysdeps/or1k/nofpu/libm-test-ulps | 4 ---- 2 files changed, 8 deletions(-) (limited to 'sysdeps/or1k') diff --git a/sysdeps/or1k/fpu/libm-test-ulps b/sysdeps/or1k/fpu/libm-test-ulps index 3fee2b5..357d0a6 100644 --- a/sysdeps/or1k/fpu/libm-test-ulps +++ b/sysdeps/or1k/fpu/libm-test-ulps @@ -74,19 +74,15 @@ double: 1 Function: "atanh": double: 2 -float: 2 Function: "atanh_downward": double: 3 -float: 3 Function: "atanh_towardzero": double: 2 -float: 2 Function: "atanh_upward": double: 3 -float: 3 Function: "cabs": double: 1 diff --git a/sysdeps/or1k/nofpu/libm-test-ulps b/sysdeps/or1k/nofpu/libm-test-ulps index a380709..ac488ab 100644 --- a/sysdeps/or1k/nofpu/libm-test-ulps +++ b/sysdeps/or1k/nofpu/libm-test-ulps @@ -86,19 +86,15 @@ double: 1 Function: "atanh": double: 2 -float: 2 Function: "atanh_downward": double: 3 -float: 3 Function: "atanh_towardzero": double: 2 -float: 2 Function: "atanh_upward": double: 3 -float: 3 Function: "atanpi": double: 1 -- cgit v1.1