aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/or1k
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-10-25 15:21:49 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-11-01 11:27:35 -0300
commitbbd578b38df4ef417acc9af332fa2ddbb4952df4 (patch)
treecc71c3652b5d47db815a62283c1633b21c946163 /sysdeps/or1k
parent5c22fd25c15ff56583ca8588f137d8e59d775752 (diff)
downloadglibc-bbd578b38df4ef417acc9af332fa2ddbb4952df4.zip
glibc-bbd578b38df4ef417acc9af332fa2ddbb4952df4.tar.gz
glibc-bbd578b38df4ef417acc9af332fa2ddbb4952df4.tar.bz2
math: Use expm1f from CORE-MATH
The CORE-MATH implementation is correctly rounded (for any rounding mode) and shows better performance compared to the generic expm1f. 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 96.7402 36.4026 62.37% x86_64v2 97.5391 33.4625 65.69% x86_64v3 82.1778 30.8668 62.44% i686 120.58 94.8302 21.35% aarch64 32.3558 12.8881 60.17% power10 23.5087 9.8574 58.07% powerpc 23.4776 9.06325 61.40% reciprocal-throughput master patched improvement x86_64 27.8224 15.9255 42.76% x86_64v2 27.8364 9.6438 65.36% x86_64v3 20.3227 9.6146 52.69% i686 63.5629 59.4718 6.44% aarch64 17.4838 7.1082 59.34% power10 12.4644 8.7829 29.54% powerpc 14.2152 5.94765 58.16% 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>
Diffstat (limited to 'sysdeps/or1k')
-rw-r--r--sysdeps/or1k/fpu/libm-test-ulps4
-rw-r--r--sysdeps/or1k/nofpu/libm-test-ulps4
2 files changed, 0 insertions, 8 deletions
diff --git a/sysdeps/or1k/fpu/libm-test-ulps b/sysdeps/or1k/fpu/libm-test-ulps
index 4ccb136..9ced4b0 100644
--- a/sysdeps/or1k/fpu/libm-test-ulps
+++ b/sysdeps/or1k/fpu/libm-test-ulps
@@ -804,19 +804,15 @@ float: 1
Function: "expm1":
double: 1
-float: 1
Function: "expm1_downward":
double: 1
-float: 1
Function: "expm1_towardzero":
double: 1
-float: 2
Function: "expm1_upward":
double: 1
-float: 1
Function: "gamma":
double: 4
diff --git a/sysdeps/or1k/nofpu/libm-test-ulps b/sysdeps/or1k/nofpu/libm-test-ulps
index 7087cf9..6862551 100644
--- a/sysdeps/or1k/nofpu/libm-test-ulps
+++ b/sysdeps/or1k/nofpu/libm-test-ulps
@@ -802,19 +802,15 @@ float: 1
Function: "expm1":
double: 1
-float: 1
Function: "expm1_downward":
double: 1
-float: 1
Function: "expm1_towardzero":
double: 1
-float: 2
Function: "expm1_upward":
double: 1
-float: 1
Function: "gamma":
double: 4