aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-10-25 15:21:47 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-11-01 11:27:26 -0300
commit5fa89852fa12fe56c315a119998affa267200f1b (patch)
tree78405c4b6dc8631840a34021e4663fa2fba6021f /sysdeps/powerpc
parent48767cbb76e17d0ee03b2cf0a43bcf01e7295b8b (diff)
downloadglibc-5fa89852fa12fe56c315a119998affa267200f1b.zip
glibc-5fa89852fa12fe56c315a119998affa267200f1b.tar.gz
glibc-5fa89852fa12fe56c315a119998affa267200f1b.tar.bz2
math: Use exp10m1f from CORE-MATH
The CORE-MATH implementation is correctly rounded (for any rounding mode) and shows better performance compared to the generic exp10m1f. The code was adapted to glibc style and to use the definition of math_config.h (to handle errno, overflow, and underflow). I mostly fixed some small issues in corner cases (sNaN handling, -INFINITY, a specific overflow check). 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 45.4690 49.5845 -9.05% x86_64v2 46.1604 36.2665 21.43% x86_64v3 37.8442 31.0359 17.99% i686 121.367 93.0079 23.37% aarch64 21.1126 15.0165 28.87% power10 12.7426 8.4929 33.35% reciprocal-throughput master patched improvement x86_64 19.6005 17.4005 11.22% x86_64v2 19.6008 11.1977 42.87% x86_64v3 17.5427 10.2898 41.34% i686 59.4215 60.9675 -2.60% aarch64 13.9814 7.9173 43.37% power10 6.7814 6.4258 5.24% The generic implementation calls __ieee754_exp10f which has an optimized version, although it is not correctly rounded, which is the main culprit of the the latency difference for x86_64 and throughp for i686. 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/powerpc')
-rw-r--r--sysdeps/powerpc/fpu/libm-test-ulps4
-rw-r--r--sysdeps/powerpc/nofpu/libm-test-ulps4
2 files changed, 0 insertions, 8 deletions
diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
index dcefbce..30ddbaf 100644
--- a/sysdeps/powerpc/fpu/libm-test-ulps
+++ b/sysdeps/powerpc/fpu/libm-test-ulps
@@ -1186,25 +1186,21 @@ ldouble: 4
Function: "exp10m1":
double: 4
-float: 2
float128: 3
ldouble: 4
Function: "exp10m1_downward":
double: 3
-float: 3
float128: 6
ldouble: 9
Function: "exp10m1_towardzero":
double: 2
-float: 3
float128: 6
ldouble: 9
Function: "exp10m1_upward":
double: 5
-float: 3
float128: 6
ldouble: 8
diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps
index 14be978..e15e1f8 100644
--- a/sysdeps/powerpc/nofpu/libm-test-ulps
+++ b/sysdeps/powerpc/nofpu/libm-test-ulps
@@ -987,22 +987,18 @@ ldouble: 4
Function: "exp10m1":
double: 3
-float: 2
ldouble: 3
Function: "exp10m1_downward":
double: 3
-float: 3
ldouble: 9
Function: "exp10m1_towardzero":
double: 2
-float: 3
ldouble: 9
Function: "exp10m1_upward":
double: 4
-float: 4
ldouble: 10
Function: "exp2":