glibc/sysdeps/unix/sysv/linux/arm/le
Joseph Myers 75ad83f564 Implement C23 pown
C23 adds various <math.h> function families originally defined in TS
18661-4.  Add the pown functions, which are like pow but with an
integer exponent.  That 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.  The test inputs are based on
the subset of test inputs for pow that use integer exponents that fit
in long long.

As the first such template implementation that saves and restores the
rounding mode internally (to avoid possible issues with directed
rounding and intermediate overflows or underflows in the wrong
rounding mode), support also needed to be added for using
SET_RESTORE_ROUND* in such template function implementations.  This
required math-type-macros-float128.h to include <fenv_private.h>, so
it can tell whether SET_RESTORE_ROUNDF128 is defined.  In turn, the
include order with <fenv_private.h> included before <math_private.h>
broke loongarch builds, showing up that
sysdeps/loongarch/math_private.h is really a fenv_private.h file
(maybe implemented internally before the consistent split of those
headers in 2018?) and needed to be renamed to fenv_private.h to avoid
errors with duplicate macro definitions if <math_private.h> is
included after <fenv_private.h>.

The underlying implementation uses __ieee754_pow functions (called
more than once in some cases, where the exponent does not fit in the
floating type).  I expect a custom implementation for a given format,
that only handles integer exponents but handles larger exponents
directly, could be faster and more accurate in some cases.

I encourage searching for worst cases for ulps error for these
implementations (necessarily non-exhaustively, given the size of the
input space).

Tested for x86_64 and x86, and with build-many-glibcs.py.
2025-03-27 10:44:44 +00:00
..
Implies
ld.abilist Fix glibc 2.34 ABI omission (missing GLIBC_2.34 in dynamic loader) 2022-01-27 18:52:05 +01:00
libBrokenLocale.abilist
libanl.abilist resolv: Move libanl into libc (if libpthread is in libc) 2021-07-02 11:45:00 +02:00
libc.abilist Add _FORTIFY_SOURCE support for inet_pton 2025-03-24 14:43:03 -04:00
libc_malloc_debug.abilist Move malloc_{g,s}et_state to libc_malloc_debug 2021-07-22 18:38:10 +05:30
libdl.abilist
libm.abilist Implement C23 pown 2025-03-27 10:44:44 +00:00
libnsl.abilist
libpthread.abilist
libresolv.abilist resolv: Move res_query functions into libc 2021-07-19 07:56:57 +02:00
librt.abilist Linux: Move timer_settime, __timer_settime64 from librt to libc 2021-06-28 09:51:01 +02:00
libthread_db.abilist
libutil.abilist login: Move libutil into libc 2021-06-30 08:43:37 +02:00