glibc/sysdeps/ieee754/ldbl-96
Joseph Myers b3f27d8150 Add narrowing fma functions
This patch adds the narrowing fused multiply-add functions from TS
18661-1 / TS 18661-3 / C2X to glibc's libm: ffma, ffmal, dfmal,
f32fmaf64, f32fmaf32x, f32xfmaf64 for all configurations; f32fmaf64x,
f32fmaf128, f64fmaf64x, f64fmaf128, f32xfmaf64x, f32xfmaf128,
f64xfmaf128 for configurations with _Float64x and _Float128;
__f32fmaieee128 and __f64fmaieee128 aliases in the powerpc64le case
(for calls to ffmal and dfmal 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, especially that for sqrt, so the
description of those generally applies to this patch as well.  As with
sqrt, I reused the same test inputs in auto-libm-test-in as for
non-narrowing fma rather than adding extra or separate inputs for
narrowing fma.  The tests in libm-test-narrow-fma.inc also follow
those for non-narrowing fma.

The non-narrowing fma has a known bug (bug 6801) that it does not set
errno on errors (overflow, underflow, Inf * 0, Inf - Inf).  Rather
than fixing this or having narrowing fma check for errors when
non-narrowing does not (complicating the cases when narrowing fma can
otherwise be an alias for a non-narrowing function), this patch does
not attempt to check for errors from narrowing fma and set errno; the
CHECK_NARROW_FMA macro is still present, but as a placeholder that
does nothing, and this missing errno setting is considered to be
covered by the existing bug rather than needing a separate open bug.
missing-errno annotations are duly added to many of the
auto-libm-test-in test inputs for fma.

This completes adding all the new functions from TS 18661-1 to glibc,
so will be followed by corresponding stdc-predef.h changes to define
__STDC_IEC_60559_BFP__ and __STDC_IEC_60559_COMPLEX__, as the support
for TS 18661-1 will be at a similar level to that for C standard
floating-point facilities up to C11 (pragmas not implemented, but
library functions done).  (There are still further changes to be done
to implement changes to the types of fromfp functions from N2548.)

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-22 21:25:31 +00:00
..
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
include/bits Add canonicalize, canonicalizef, canonicalizel. 2016-10-26 23:14:31 +00:00
e_acoshl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_asinl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_atanhl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_coshl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_gammal_r.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_hypotl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_j0l.c Adjust thresholds in Bessel function implementations (bug 14469). 2020-02-14 14:16:25 +00:00
e_j1l.c Adjust thresholds in Bessel function implementations (bug 14469). 2020-02-14 14:16:25 +00:00
e_jnl.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_lgammal_r.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_rem_pio2l.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_sinhl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
gamma_product.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gamma_productl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
k_cosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
k_sinl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
k_tanl.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ldbl2mpn.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lgamma_negl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lgamma_product.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lgamma_productl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makeconfig add workload traces for cbrtl 2021-05-10 18:45:34 +02:00
Makefile Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
math-nan-payload-ldouble.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
mpn2ldbl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nan-pseudo-number.h Drop nan-pseudo-number.h usage from tests 2021-01-04 20:49:56 +05:30
printf_fphex.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_asinhl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_cbrtl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_copysignl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_cosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_daddl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_ddivl.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_dfmal.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_dmull.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_dsqrtl.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00
s_dsubl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_erfl.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
s_faddl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_fdivl.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_ffmal.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_fma.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_fmal.c Redirect fma calls to __fma in libm 2021-09-15 22:57:35 +00:00
s_fmull.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_frexpl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fromfpl.c Use libm_alias_ldouble for ldbl-96 functions. 2017-10-05 21:13:40 +00:00
s_fromfpl_main.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_fromfpxl.c Use libm_alias_ldouble for ldbl-96 functions. 2017-10-05 21:13:40 +00:00
s_fsqrtl.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00
s_fsubl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_getpayloadl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_iscanonicall.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_issignalingl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_llrintl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_llroundl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lrintl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lroundl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_modfl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nexttoward.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_nexttowardf.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nextupl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_remquol.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_roundevenl.c math: redirect roundeven function 2021-06-27 07:56:57 -07:00
s_roundl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_scalblnl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_setpayloadl.c Use libm_alias_ldouble for ldbl-96 functions. 2017-10-05 21:13:40 +00:00
s_setpayloadl_main.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_setpayloadsigl.c Use libm_alias_ldouble for ldbl-96 functions. 2017-10-05 21:13:40 +00:00
s_signbitl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_sincosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_sinl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_tanhl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_tanl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_totalorderl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_totalordermagl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_ufromfpl.c Use libm_alias_ldouble for ldbl-96 functions. 2017-10-05 21:13:40 +00:00
s_ufromfpxl.c Use libm_alias_ldouble for ldbl-96 functions. 2017-10-05 21:13:40 +00:00
strtold_l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
t_sincosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
test-canonical-ldbl-96.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-sinl-pseudo.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-totalorderl-ldbl-96.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x2y2m1.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x2y2m1l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00