glibc/sysdeps/ieee754/ldbl-128ibm-compat
Joseph Myers 7ec903e028 Implement C23 exp2m1, exp10m1
C23 adds various <math.h> function families originally defined in TS
18661-4.  Add the exp2m1 and exp10m1 functions (exp2(x)-1 and
exp10(x)-1, like expm1).

As with other such functions, these use type-generic templates that
could be replaced with faster and more accurate type-specific
implementations in future.  Test inputs are copied from those for
expm1, plus some additions close to the overflow threshold (copied
from exp2 and exp10) and also some near the underflow threshold.

exp2m1 has the unusual property of having an input (M_MAX_EXP) where
whether the function overflows (under IEEE semantics) depends on the
rounding mode.  Although these could reasonably be XFAILed in the
testsuite (as we do in some cases for arguments very close to a
function's overflow threshold when an error of a few ulps in the
implementation can result in the implementation not agreeing with an
ideal one on whether overflow takes place - the testsuite isn't smart
enough to handle this automatically), since these functions aren't
required to be correctly rounding, I made the implementation check for
and handle this case specially.

The Makefile ordering expected by lint-makefiles for the new functions
is a bit peculiar, but I implemented it in this patch so that the test
passes; I don't know why log2 also needed moving in one Makefile
variable setting when it didn't in my previous patches, but the
failure showed a different place was expected for that function as
well.

The powerpc64le IFUNC setup seems not to be as self-contained as one
might hope; it shouldn't be necessary to add IFUNCs for new functions
such as these simply to get them building, but without setting up
IFUNCs for the new functions, there were undefined references to
__GI___expm1f128 (that IFUNC machinery results in no such function
being defined, but doesn't stop include/math.h from doing the
redirection resulting in the exp2m1f128 and exp10m1f128
implementations expecting to call it).

Tested for x86_64 and x86, and with build-many-glibcs.py.
2024-06-17 16:31:49 +00:00
..
bits Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
e_scalbf128.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-argp-help.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-asprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-asprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-dprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-dprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-err.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-error.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-fprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-fprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-fscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-fwprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-fwprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-fwscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_fscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_fwscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_scanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_sscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_swscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_vfscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_vfwscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_vscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_vsscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_vswscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_vwscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc23_wscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_fscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_fwscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_scanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_sscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_swscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_vfscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_vfwscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_vscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_vsscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_vswscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_vwscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-isoc99_wscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-obprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-obstack_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-printf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-printf_size.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-printf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-qefgcvt_r.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-qefgcvt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-scanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-snprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-snprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-sprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-sprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-sscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-strfmon_l.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-strfmon.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-swprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-swprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-swscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-syslog.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vasprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vasprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vdprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vdprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vfprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vfprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vfscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vfwprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vfwprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vfwscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vobstack_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vsnprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vsnprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vsprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vsprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vsscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vswprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vswprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vswscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vwprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vwprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-vwscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-wprintf_chk.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-wprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ieee128-wscanf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
libm-alias-float128.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Makeconfig
Makefile Rename c2x / gnu2x tests to c23 / gnu23 2024-02-01 17:55:57 +00:00
math_ldbl.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
math-narrow-alias-float128.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_nextafterf128.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_nexttowardf128.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
s_significandf128.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
set-freeres-fp.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strfromf128.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strtof128_l.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strtof128.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-isoc99-scanf-ibm128.c
test-isoc99-scanf-ieee128.c
test-isoc99-wscanf-ibm128.c
test-isoc99-wscanf-ieee128.c
test-obstack-chk-ibm128.c
test-obstack-chk-ieee128.c
test-obstack-chk-ldbl-compat.c
test-obstack-ibm128.c
test-obstack-ieee128.c
test-obstack-ldbl-compat-template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-obstack-ldbl-compat.c
test-printf-chk-ibm128.c
test-printf-chk-ieee128.c
test-printf-chk-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-printf-chk-redir-ibm128.c
test-printf-chk-redir-ieee128.c
test-printf-ibm128.c
test-printf-ieee128.c
test-printf-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-printf-size-ibm128.c
test-printf-size-ieee128.c
test-scanf-ibm128.c
test-scanf-ieee128.c
test-scanf-ldbl-compat-template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-scanf-ldbl-compat.c
test-scanf-ldbl-compat.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-strfmon-ibm128.c
test-strfmon-ieee128.c
test-strfmon-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-strfrom-ibm128.c
test-strfrom-ieee128.c
test-strfrom-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-syslog-chk-ibm128.c
test-syslog-chk-ieee128.c
test-syslog-chk-ldbl-compat.c
test-syslog-ibm128.c
test-syslog-ieee128.c
test-syslog-ldbl-compat-template.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-syslog-ldbl-compat.c
test-wcstold-ibm128.c
test-wcstold-ieee128.c
test-wcstold-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-wprintf-chk-ibm128.c
test-wprintf-chk-ieee128.c
test-wprintf-chk-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-wprintf-chk-redir-ibm128.c
test-wprintf-chk-redir-ieee128.c
test-wprintf-ibm128.c
test-wprintf-ieee128.c
test-wprintf-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-wscanf-ibm128.c
test-wscanf-ieee128.c
test-wscanf-ldbl-compat.c
tst-ibm128-scanf-binary-c11.c
tst-ibm128-scanf-binary-c23.c Rename c2x / gnu2x tests to c23 / gnu23 2024-02-01 17:55:57 +00:00
tst-ibm128-scanf-binary-gnu11.c
tst-ibm128-scanf-binary-gnu89.c
tst-ibm128-wscanf-binary-c11.c
tst-ibm128-wscanf-binary-c23.c Rename c2x / gnu2x tests to c23 / gnu23 2024-02-01 17:55:57 +00:00
tst-ibm128-wscanf-binary-gnu11.c
tst-ibm128-wscanf-binary-gnu89.c
tst-ieee128-scanf-binary-c11.c
tst-ieee128-scanf-binary-c23.c Rename c2x / gnu2x tests to c23 / gnu23 2024-02-01 17:55:57 +00:00
tst-ieee128-scanf-binary-gnu11.c
tst-ieee128-scanf-binary-gnu89.c
tst-ieee128-wscanf-binary-c11.c
tst-ieee128-wscanf-binary-c23.c Rename c2x / gnu2x tests to c23 / gnu23 2024-02-01 17:55:57 +00:00
tst-ieee128-wscanf-binary-gnu11.c
tst-ieee128-wscanf-binary-gnu89.c
Versions Implement C23 exp2m1, exp10m1 2024-06-17 16:31:49 +00:00
w_scalbf128.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcstof128_l.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wcstof128.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00