aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/powerpc
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2025-05-14 10:51:46 +0000
committerJoseph Myers <josmyers@redhat.com>2025-05-14 10:51:46 +0000
commit06caf53adfae0c93062edd62f83eed16ab5cec0b (patch)
tree75282662b640f39f04d13b7ba79eb3e9fb79e5ea /sysdeps/unix/sysv/linux/powerpc
parent36189c76fb9c0b281de23381ae5a462a7e102ee6 (diff)
downloadglibc-master.zip
glibc-master.tar.gz
glibc-master.tar.bz2
Implement C23 rootn.HEADmaster
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the rootn functions, which compute the Yth root of X for integer Y (with a domain error if Y is 0, even if X is a NaN). The integer exponent has type long long int in C23; it was intmax_t in TS 18661-4, and as with other interfaces changed after their initial appearance in the TS, I don't think we need to support the original version of the interface. As with pown and compoundn, I strongly encourage searching for worst cases for ulps error for these implementations (necessarily non-exhaustively, given the size of the input space). I also expect a custom implementation for a given format could be much faster as well as more accurate, although the implementation is simpler than those for pown and compoundn. This completes adding to glibc those TS 18661-4 functions (ignoring DFP) that are included in C23. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118592 regarding the C23 mathematical functions (not just the TS 18661-4 ones) missing built-in functions in GCC, where such functions might usefully be added. Tested for x86_64 and x86, and with build-many-glibcs.py.
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist9
4 files changed, 27 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
index a43cb2c..7f584d3 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
@@ -1085,6 +1085,12 @@ GLIBC_2.42 powrf32 F
GLIBC_2.42 powrf32x F
GLIBC_2.42 powrf64 F
GLIBC_2.42 powrl F
+GLIBC_2.42 rootn F
+GLIBC_2.42 rootnf F
+GLIBC_2.42 rootnf32 F
+GLIBC_2.42 rootnf32x F
+GLIBC_2.42 rootnf64 F
+GLIBC_2.42 rootnl F
GLIBC_2.42 rsqrt F
GLIBC_2.42 rsqrtf F
GLIBC_2.42 rsqrtf32 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
index 3a08e9f..d1cd4b1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
@@ -1084,6 +1084,12 @@ GLIBC_2.42 powrf32 F
GLIBC_2.42 powrf32x F
GLIBC_2.42 powrf64 F
GLIBC_2.42 powrl F
+GLIBC_2.42 rootn F
+GLIBC_2.42 rootnf F
+GLIBC_2.42 rootnf32 F
+GLIBC_2.42 rootnf32x F
+GLIBC_2.42 rootnf64 F
+GLIBC_2.42 rootnl F
GLIBC_2.42 rsqrt F
GLIBC_2.42 rsqrtf F
GLIBC_2.42 rsqrtf32 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
index 93796cd..bfc5310 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
@@ -1078,6 +1078,12 @@ GLIBC_2.42 powrf32 F
GLIBC_2.42 powrf32x F
GLIBC_2.42 powrf64 F
GLIBC_2.42 powrl F
+GLIBC_2.42 rootn F
+GLIBC_2.42 rootnf F
+GLIBC_2.42 rootnf32 F
+GLIBC_2.42 rootnf32x F
+GLIBC_2.42 rootnf64 F
+GLIBC_2.42 rootnl F
GLIBC_2.42 rsqrt F
GLIBC_2.42 rsqrtf F
GLIBC_2.42 rsqrtf32 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
index 7fe20c0..dedfefc 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
@@ -1432,6 +1432,7 @@ GLIBC_2.41 tanpil F
GLIBC_2.42 __compoundnieee128 F
GLIBC_2.42 __pownieee128 F
GLIBC_2.42 __powrieee128 F
+GLIBC_2.42 __rootnieee128 F
GLIBC_2.42 __rsqrtieee128 F
GLIBC_2.42 compoundn F
GLIBC_2.42 compoundnf F
@@ -1457,6 +1458,14 @@ GLIBC_2.42 powrf32x F
GLIBC_2.42 powrf64 F
GLIBC_2.42 powrf64x F
GLIBC_2.42 powrl F
+GLIBC_2.42 rootn F
+GLIBC_2.42 rootnf F
+GLIBC_2.42 rootnf128 F
+GLIBC_2.42 rootnf32 F
+GLIBC_2.42 rootnf32x F
+GLIBC_2.42 rootnf64 F
+GLIBC_2.42 rootnf64x F
+GLIBC_2.42 rootnl F
GLIBC_2.42 rsqrt F
GLIBC_2.42 rsqrtf F
GLIBC_2.42 rsqrtf128 F