glibc/sysdeps/ieee754/dbl-64
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
..
asincos.tbl Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
atnat2.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
atnat.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
branred.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
branred.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
dbl2mpn.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dla.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_acos.c
e_acosh.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_asin.c math: Remove slow paths from asin and acos [BZ #15267] 2021-03-11 14:26:36 +00:00
e_atan2.c math: Remove slow paths from atan2 [BZ #15267] 2021-03-11 14:26:36 +00:00
e_atanh.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_cosh.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_exp2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_exp10.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_exp_data.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_exp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_fmod.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_gamma_r.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_hypot.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_ilogb.c
e_j0.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_j1.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_jn.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_lgamma_r.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_log2_data.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_log2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_log10.c Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
e_log_data.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_log.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_pow_log_data.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_pow.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_remainder.c math: Remove mpa files [BZ #15267] 2021-03-11 14:26:36 +00:00
e_sinh.c Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
e_sqrt.c math: Remove mpa files [BZ #15267] 2021-03-11 14:26:36 +00:00
gamma_product.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gamma_productf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
k_rem_pio2.c Fix a few typos in comments 2019-01-12 13:44:51 +00:00
k_tan.c
lgamma_neg.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
Makefile Add new pow implementation 2018-09-19 10:04:51 +01:00
math_config.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
math_err.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mpn2dbl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mydefs.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
powtwo.tbl Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
root.tbl Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_asinh.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
s_atan.c math: Remove slow paths from atan [BZ #15267] 2021-03-11 14:26:36 +00:00
s_cbrt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_ceil.c Use GCC builtins for ceil functions if desired. 2019-12-11 15:12:17 +01:00
s_copysign.c Use GCC builtins for copysign functions if desired. 2019-12-11 15:12:19 +01:00
s_cos.c
s_erf.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_expm1.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_f32xaddf64.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_f32xdivf64.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_f32xfmaf64.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_f32xmulf64.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_f32xsqrtf64.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00
s_f32xsubf64.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_fabs.c Use libm_alias_double for some dbl-64 functions. 2017-09-29 23:54:33 +00:00
s_fadd.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_fdiv.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_ffma.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_finite.c math: Use wordsize-64 version for finite 2019-06-12 14:32:39 -03:00
s_floor.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fma.c Add narrowing fma functions 2021-09-22 21:25:31 +00:00
s_fmaf.c Redirect fma calls to __fma in libm 2021-09-15 22:57:35 +00:00
s_fmul.c Fix f64xdivf128, f64xmulf128 spurious underflows (bug 28358) 2021-09-21 21:54:37 +00:00
s_fpclassify.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_frexp.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fromfp_main.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_fromfp.c Use libm_alias_double for some dbl-64 functions. 2017-09-29 23:54:33 +00:00
s_fromfpx.c Use libm_alias_double for some dbl-64 functions. 2017-09-29 23:54:33 +00:00
s_fsqrt.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00
s_fsub.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_getpayload.c Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
s_isinf.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_isnan.c math: Use wordsize-64 version for isnan 2019-06-12 14:32:18 -03:00
s_issignaling.c Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
s_llrint.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_llround.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_log1p.c Do not include math-barriers.h in math_private.h. 2018-05-11 15:11:38 +00:00
s_logb.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lrint.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lround.c Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
s_modf.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nearbyint.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nexttoward.c
s_nextup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_remquo.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_rint.c Use GCC builtins for rint functions if desired. 2019-12-11 15:12:16 +01:00
s_round.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_roundeven.c Use GCC builtins for roundeven functions if desired. 2021-06-27 07:56:57 -07:00
s_scalbln.c Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
s_scalbn.c Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
s_setpayload_main.c Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
s_setpayload.c Use libm_alias_double for some dbl-64 functions. 2017-09-29 23:54:33 +00:00
s_setpayloadsig.c Use libm_alias_double for some dbl-64 functions. 2017-09-29 23:54:33 +00:00
s_signbit.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_sin.c math: Remove mpa files [BZ #15267] 2021-03-11 14:26:36 +00:00
s_sincos.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_tan.c math: Remove slow paths in tan [BZ #15267] 2021-03-11 14:26:36 +00:00
s_tanh.c Move math_check_force_underflow macros to separate math-underflow.h. 2018-05-10 00:53:04 +00:00
s_totalorder.c Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
s_totalordermag.c Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
s_trunc.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_ufromfp.c Use libm_alias_double for some dbl-64 functions. 2017-09-29 23:54:33 +00:00
s_ufromfpx.c Use libm_alias_double for some dbl-64 functions. 2017-09-29 23:54:33 +00:00
sincostab.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
uasncs.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
uatan.tbl Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
urem.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
usncs.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
utan.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
utan.tbl Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
w_exp2.c Remove the error handling wrapper from exp and exp2 2018-11-21 09:55:02 +00:00
w_exp.c Remove the error handling wrapper from exp and exp2 2018-11-21 09:55:02 +00:00
w_log2.c Remove the error handling wrapper from log2 2018-11-21 09:57:21 +00:00
w_log.c Remove the error handling wrapper from log 2018-11-21 09:56:27 +00:00
w_pow.c Remove the error handling wrapper from pow 2018-11-21 09:58:36 +00:00
x2y2m1.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x2y2m1f.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00