mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
Implement C23 rootn.
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.
This commit is contained in:
@@ -1379,6 +1379,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
|
||||
|
||||
@@ -1269,6 +1269,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
|
||||
|
||||
Reference in New Issue
Block a user