glibc/sysdeps/ieee754/ldbl-128ibm-compat
Joseph Myers 90f0ac10a7 Add fmaximum, fminimum functions
C2X adds new <math.h> functions for floating-point maximum and
minimum, corresponding to the new operations that were added in IEEE
754-2019 because of concerns about the old operations not being
associative in the presence of signaling NaNs.  fmaximum and fminimum
handle NaNs like most <math.h> functions (any NaN argument means the
result is a quiet NaN).  fmaximum_num and fminimum_num handle both
quiet and signaling NaNs the way fmax and fmin handle quiet NaNs (if
one argument is a number and the other is a NaN, return the number),
but still raise "invalid" for a signaling NaN argument, making them
exceptions to the normal rule that a function with a floating-point
result raising "invalid" also returns a quiet NaN.  fmaximum_mag,
fminimum_mag, fmaximum_mag_num and fminimum_mag_num are corresponding
functions returning the argument with greatest or least absolute
value.  All these functions also treat +0 as greater than -0.  There
are also corresponding <tgmath.h> type-generic macros.

Add these functions to glibc.  The implementations use type-generic
templates based on those for fmax, fmin, fmaxmag and fminmag, and test
inputs are based on those for those functions with appropriate
adjustments to the expected results.  The RISC-V maintainers might
wish to add optimized versions of fmaximum_num and fminimum_num (for
float and double), since RISC-V (F extension version 2.2 and later)
provides instructions corresponding to those functions - though it
might be at least as useful to add architecture-independent built-in
functions to GCC and teach the RISC-V back end to expand those
functions inline, which is what you generally want for functions that
can be implemented with a single instruction.

Tested for x86_64 and x86, and with build-many-glibcs.py.
2021-09-28 23:31:35 +00:00
..
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_scalbf128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-argp-help.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-asprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-asprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-dprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-dprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-err.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-error.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-fprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-fprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-fscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-fwprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-fwprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-fwscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_fscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_fwscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_scanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_sscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_swscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_vfscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_vfwscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_vscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_vsscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_vswscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_vwscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-isoc99_wscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-obprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-obstack_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-printf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-printf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-printf_size.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-qefgcvt.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-qefgcvt_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-scanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-snprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-snprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-sprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-sprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-sscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-strfmon.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-strfmon_l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-swprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-swprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-swscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-syslog.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vasprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vasprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vdprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vdprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vfprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vfprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vfscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vfwprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vfwprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vfwscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vobstack_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vsnprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vsnprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vsprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vsprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vsscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vswprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vswprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vswscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vwprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vwprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-vwscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-wprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-wprintf_chk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ieee128-wscanf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libm-alias-float128.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makeconfig ldbl-128ibm-compat: Add tests for IBM long double functions 2020-03-06 09:17:32 -06:00
Makefile stdio-common: Remove _IO_vfwscanf 2021-06-01 16:00:52 +02:00
math-narrow-alias-float128.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
math_ldbl.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_nextafterf128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_nexttowardf128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_significandf128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strfromf128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strtof128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strtof128_l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-isoc99-scanf-ibm128.c ldbl-128ibm-compat: Add ISO C99 versions of scanf functions 2019-12-13 18:02:09 -03:00
test-isoc99-scanf-ieee128.c ldbl-128ibm-compat: Add ISO C99 versions of scanf functions 2019-12-13 18:02:09 -03:00
test-isoc99-wscanf-ibm128.c ldbl-128ibm-compat: Add ISO C99 versions of scanf functions 2019-12-13 18:02:09 -03:00
test-isoc99-wscanf-ieee128.c ldbl-128ibm-compat: Add ISO C99 versions of scanf functions 2019-12-13 18:02:09 -03:00
test-obstack-chk-ibm128.c ldbl-128ibm-compat: Add obstack printing functions 2019-11-27 15:52:41 -03:00
test-obstack-chk-ieee128.c ldbl-128ibm-compat: Add obstack printing functions 2019-11-27 15:52:41 -03:00
test-obstack-chk-ldbl-compat.c ldbl-128ibm-compat: Add obstack printing functions 2019-11-27 15:52:41 -03:00
test-obstack-ibm128.c ldbl-128ibm-compat: Add obstack printing functions 2019-11-27 15:52:41 -03:00
test-obstack-ieee128.c ldbl-128ibm-compat: Add obstack printing functions 2019-11-27 15:52:41 -03:00
test-obstack-ldbl-compat-template.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-obstack-ldbl-compat.c ldbl-128ibm-compat: Add obstack printing functions 2019-11-27 15:52:41 -03:00
test-printf-chk-ibm128.c ldbl-128ibm-compat: Add regular character, fortified printing functions 2019-11-22 18:11:49 -03:00
test-printf-chk-ieee128.c ldbl-128ibm-compat: Add regular character, fortified printing functions 2019-11-22 18:11:49 -03:00
test-printf-chk-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-printf-chk-redir-ibm128.c ldbl-128ibm-compat: Add regular character, fortified printing functions 2019-11-22 18:11:49 -03:00
test-printf-chk-redir-ieee128.c ldbl-128ibm-compat: Add regular character, fortified printing functions 2019-11-22 18:11:49 -03:00
test-printf-ibm128.c ldbl-128ibm-compat: Add regular character printing functions 2019-11-22 18:10:52 -03:00
test-printf-ieee128.c ldbl-128ibm-compat: Add regular character printing functions 2019-11-22 18:10:52 -03:00
test-printf-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-printf-size-ibm128.c ldbl-128ibm-compat: Add printf_size 2018-07-02 10:51:01 -03:00
test-printf-size-ieee128.c ldbl-128ibm-compat: Add printf_size 2018-07-02 10:51:01 -03:00
test-scanf-ibm128.c ldbl-128ibm-compat: Add regular character scanning functions 2019-11-22 18:13:01 -03:00
test-scanf-ieee128.c ldbl-128ibm-compat: Add regular character scanning functions 2019-11-22 18:13:01 -03:00
test-scanf-ldbl-compat-template.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-scanf-ldbl-compat.c ldbl-128ibm-compat: Add ISO C99 versions of scanf functions 2019-12-13 18:02:09 -03:00
test-scanf-ldbl-compat.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-strfmon-ibm128.c ldbl-128ibm-compat: Add tests for strfmon and strfmon_l 2019-12-03 13:30:42 -03:00
test-strfmon-ieee128.c ldbl-128ibm-compat: Add tests for strfmon and strfmon_l 2019-12-03 13:30:42 -03:00
test-strfmon-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-strfrom-ibm128.c ldbl-128ibm-compat: Add tests for strfroml, strtold, and wcstold 2019-12-03 13:30:42 -03:00
test-strfrom-ieee128.c ldbl-128ibm-compat: Add tests for strfroml, strtold, and wcstold 2019-12-03 13:30:42 -03:00
test-strfrom-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-syslog-chk-ibm128.c ldbl-128ibm-compat: Add syslog functions 2019-11-27 15:52:41 -03:00
test-syslog-chk-ieee128.c ldbl-128ibm-compat: Add syslog functions 2019-11-27 15:52:41 -03:00
test-syslog-chk-ldbl-compat.c ldbl-128ibm-compat: Add syslog functions 2019-11-27 15:52:41 -03:00
test-syslog-ibm128.c ldbl-128ibm-compat: Add syslog functions 2019-11-27 15:52:41 -03:00
test-syslog-ieee128.c ldbl-128ibm-compat: Add syslog functions 2019-11-27 15:52:41 -03:00
test-syslog-ldbl-compat-template.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-syslog-ldbl-compat.c ldbl-128ibm-compat: Add syslog functions 2019-11-27 15:52:41 -03:00
test-wcstold-ibm128.c ldbl-128ibm-compat: Add tests for strfroml, strtold, and wcstold 2019-12-03 13:30:42 -03:00
test-wcstold-ieee128.c ldbl-128ibm-compat: Add tests for strfroml, strtold, and wcstold 2019-12-03 13:30:42 -03:00
test-wcstold-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-wprintf-chk-ibm128.c ldbl-128ibm-compat: Add wide character, fortified printing functions 2019-11-22 18:12:27 -03:00
test-wprintf-chk-ieee128.c ldbl-128ibm-compat: Add wide character, fortified printing functions 2019-11-22 18:12:27 -03:00
test-wprintf-chk-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-wprintf-chk-redir-ibm128.c ldbl-128ibm-compat: Add wide character, fortified printing functions 2019-11-22 18:12:27 -03:00
test-wprintf-chk-redir-ieee128.c ldbl-128ibm-compat: Add wide character, fortified printing functions 2019-11-22 18:12:27 -03:00
test-wprintf-ibm128.c ldbl-128ibm-compat: Add wide character printing functions 2019-11-22 18:11:38 -03:00
test-wprintf-ieee128.c ldbl-128ibm-compat: Add wide character printing functions 2019-11-22 18:11:38 -03:00
test-wprintf-ldbl-compat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-wscanf-ibm128.c ldbl-128ibm-compat: Add wide character scanning functions 2019-11-22 18:13:20 -03:00
test-wscanf-ieee128.c ldbl-128ibm-compat: Add wide character scanning functions 2019-11-22 18:13:20 -03:00
test-wscanf-ldbl-compat.c ldbl-128ibm-compat: Add ISO C99 versions of scanf functions 2019-12-13 18:02:09 -03:00
Versions Add fmaximum, fminimum functions 2021-09-28 23:31:35 +00:00
w_scalbf128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wcstof128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wcstof128_l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00