aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-10-20 14:52:49 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-11-01 11:27:39 -0300
commit8ae9e513762b1a67bac854871fc02988feb22efb (patch)
tree771a2565821e9313bf9ea58478933ee9a5c48749 /sysdeps/powerpc
parentc3695808141ff1655da8da3c4e9330bcd2305f55 (diff)
downloadglibc-8ae9e513762b1a67bac854871fc02988feb22efb.zip
glibc-8ae9e513762b1a67bac854871fc02988feb22efb.tar.gz
glibc-8ae9e513762b1a67bac854871fc02988feb22efb.tar.bz2
math: Use log1pf from CORE-MATH
The CORE-MATH implementation is correctly rounded (for any rounding mode) and shows slight better performance to the generic log1pf. 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 (M1, gcc 13.2.1), and powerpc (POWER10, gcc 13.2.1): Latency master patched improvement x86_64 71.8142 38.9668 45.74% x86_64v2 71.9094 39.1321 45.58% x86_64v3 60.1000 32.4016 46.09% i686 147.105 104.258 29.13% aarch64 26.4439 14.0050 47.04% power10 19.4874 9.4146 51.69% powerpc 17.6145 8.00736 54.54% reciprocal-throughput master patched improvement x86_64 19.7604 12.7254 35.60% x86_64v2 19.0039 11.9455 37.14% x86_64v3 16.8559 11.9317 29.21% i686 82.3426 73.9718 10.17% aarch64 14.4665 7.9614 44.97% power10 11.9974 8.4117 29.89% powerpc 7.15222 6.0914 14.83% 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-ulps8
-rw-r--r--sysdeps/powerpc/nofpu/libm-test-ulps8
2 files changed, 0 insertions, 16 deletions
diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
index f775c56..48a3ea1 100644
--- a/sysdeps/powerpc/fpu/libm-test-ulps
+++ b/sysdeps/powerpc/fpu/libm-test-ulps
@@ -1521,25 +1521,21 @@ ldouble: 6
Function: "log1p":
double: 1
-float: 1
float128: 3
ldouble: 2
Function: "log1p_downward":
double: 1
-float: 2
float128: 3
ldouble: 2
Function: "log1p_towardzero":
double: 2
-float: 2
float128: 3
ldouble: 3
Function: "log1p_upward":
double: 2
-float: 2
float128: 2
ldouble: 3
@@ -1605,25 +1601,21 @@ ldouble: 1
Function: "logp1":
double: 1
-float: 1
float128: 3
ldouble: 2
Function: "logp1_downward":
double: 1
-float: 2
float128: 3
ldouble: 2
Function: "logp1_towardzero":
double: 2
-float: 2
float128: 3
ldouble: 3
Function: "logp1_upward":
double: 2
-float: 2
float128: 2
ldouble: 3
diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps
index a732166..ec91048 100644
--- a/sysdeps/powerpc/nofpu/libm-test-ulps
+++ b/sysdeps/powerpc/nofpu/libm-test-ulps
@@ -1277,22 +1277,18 @@ ldouble: 6
Function: "log1p":
double: 1
-float: 1
ldouble: 2
Function: "log1p_downward":
double: 2
-float: 2
ldouble: 2
Function: "log1p_towardzero":
double: 2
-float: 2
ldouble: 2
Function: "log1p_upward":
double: 2
-float: 2
ldouble: 2
Function: "log2":
@@ -1346,22 +1342,18 @@ ldouble: 1
Function: "logp1":
double: 1
-float: 1
ldouble: 2
Function: "logp1_downward":
double: 2
-float: 2
ldouble: 2
Function: "logp1_towardzero":
double: 2
-float: 2
ldouble: 2
Function: "logp1_upward":
double: 2
-float: 2
ldouble: 2
Function: "mul_downward_ldouble":