glibc/sysdeps/ieee754/ldbl-128ibm-compat
Joseph Myers abd383584b Add narrowing square root functions
This patch adds the narrowing square root functions from TS 18661-1 /
TS 18661-3 / C2X to glibc's libm: fsqrt, fsqrtl, dsqrtl, f32sqrtf64,
f32sqrtf32x, f32xsqrtf64 for all configurations; f32sqrtf64x,
f32sqrtf128, f64sqrtf64x, f64sqrtf128, f32xsqrtf64x, f32xsqrtf128,
f64xsqrtf128 for configurations with _Float64x and _Float128;
__f32sqrtieee128 and __f64sqrtieee128 aliases in the powerpc64le case
(for calls to fsqrtl and dsqrtl when long double is IEEE binary128).
Corresponding tgmath.h macro support is also added.

The changes are mostly similar to those for the other narrowing
functions previously added, so the description of those generally
applies to this patch as well.  However, the not-actually-narrowing
cases (where the two types involved in the function have the same
floating-point format) are aliased to sqrt, sqrtl or sqrtf128 rather
than needing a separately built not-actually-narrowing function such
as was needed for add / sub / mul / div.  Thus, there is no
__nldbl_dsqrtl name for ldbl-opt because no such name was needed
(whereas the other functions needed such a name since the only other
name for that entry point was e.g. f32xaddf64, not reserved by TS
18661-1); the headers are made to arrange for sqrt to be called in
that case instead.

The DIAG_* calls in sysdeps/ieee754/soft-fp/s_dsqrtl.c are because
they were observed to be needed in GCC 7 testing of
riscv32-linux-gnu-rv32imac-ilp32.  The other sysdeps/ieee754/soft-fp/
files added didn't need such DIAG_* in any configuration I tested with
build-many-glibcs.py, but if they do turn out to be needed in more
files with some other configuration / GCC version, they can always be
added there.

I reused the same test inputs in auto-libm-test-in as for
non-narrowing sqrt rather than adding extra or separate inputs for
narrowing sqrt.  The tests in libm-test-narrow-sqrt.inc also follow
those for non-narrowing sqrt.

Tested as followed: natively with the full glibc testsuite for x86_64
(GCC 11, 7, 6) and x86 (GCC 11); with build-many-glibcs.py with GCC
11, 7 and 6; cross testing of math/ tests for powerpc64le, powerpc32
hard float, mips64 (all three ABIs, both hard and soft float).  The
different GCC versions are to cover the different cases in tgmath.h
and tgmath.h tests properly (GCC 6 has _Float* only as typedefs in
glibc headers, GCC 7 has proper _Float* support, GCC 8 adds
__builtin_tgmath).
2021-09-10 20:56:22 +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_chk.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-dprintf_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-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_chk.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-fscanf.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-fwprintf.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_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-printf.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-qefgcvt.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_chk.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-sprintf_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-sscanf.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-strfmon.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-swprintf.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_chk.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-vdprintf_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-vfprintf_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-vfscanf.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-vfwprintf.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_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-vscanf.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-vsnprintf.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-vsprintf.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_chk.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-vswscanf.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-vwprintf.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_chk.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-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_ldbl.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
math-narrow-alias-float128.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_l.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
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 narrowing square root functions 2021-09-10 20:56:22 +00:00
w_scalbf128.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
wcstof128.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00