glibc/sysdeps/i386/fpu
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
..
doasin.c
e_acos.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_acosf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_acosh.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_acoshf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_acoshl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_acosl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_asin.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_asinf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atan2.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atan2f.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atan2l.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atanh.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atanhf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_atanhl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_exp2.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_exp2l.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_exp10.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_exp10l.S Fix exp10 inaccuracy and exceptions (bugs 13884, 13914). 2012-05-06 18:23:44 +00:00
e_exp_data.c Add new exp and exp2 implementations 2018-09-05 16:22:00 +01:00
e_exp.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_expl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_fmod.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_fmodf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_fmodl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_hypot.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_hypotf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_ilogb.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_ilogbf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_ilogbl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log2_data.c Add new log2 implementation 2018-09-12 17:36:33 +01:00
e_log2.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log2l.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log10.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log10f.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log10l.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_log_data.c Add new log implementation 2018-09-12 17:33:30 +01:00
e_log.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_logl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_pow_log_data.c Add new pow implementation 2018-09-19 10:04:51 +01:00
e_pow.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_powl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_remainder.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_remainderf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_remainderl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_scalb.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_scalbf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_scalbl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_sqrt.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
e_sqrtf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fclrexcpt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fedisblxcpt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
feenablxcpt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fegetenv.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fegetexcept.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fegetmode.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fegetround.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
feholdexcpt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fesetenv.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fesetexcept.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fesetmode.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fesetround.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
feupdateenv.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fgetexcptflg.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fraiseexcpt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fsetexcptflg.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ftestexcept.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
i386-math-asm.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Implies Use x86_64 fpu/bits/fenv.h for i386 and x86_64 2012-06-06 10:13:19 -07:00
libm-test-ulps i386: Regenerate ulps 2021-07-25 22:29:27 +02:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
math_err.c Add new exp and exp2 implementations 2018-09-05 16:22:00 +01:00
math-tests-snan.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mpatan2.c
mpatan.c
mpsqrt.c
s_asinh.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_asinhf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_asinhl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_atan.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_atanf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_atanl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_cbrt.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_cbrtf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_cbrtl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_ceil.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_ceilf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_ceill.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_copysign.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_copysignf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_copysignl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_expm1.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_expm1f.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_expm1l.S Fix x86/x86_64 expm1l inaccuracy and exceptions (bugs 13885, 13923). 2012-05-07 19:13:08 +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_f32xmulf64.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_f32xsubf64.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_fabs.S Use libm_alias_double for i386. 2017-11-28 18:15:44 +00:00
s_fabsf.S Use libm_alias_float for i386. 2017-11-29 00:10:35 +00:00
s_fabsl.S Use libm_alias_ldouble in sysdeps/i386/fpu. 2017-11-17 22:54:39 +00:00
s_fdim.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
s_finite.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_finitef.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_finitel.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_floor.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_floorf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_floorl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fmax.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fmaxf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fmaxl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fmin.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fminf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_fminl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_frexp.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_frexpf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_frexpl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_isinfl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_llrint.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_llrintf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_llrintl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_log1p.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_log1pf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_log1pl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_logb.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_logbf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_logbl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lrint.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lrintf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_lrintl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nearbyint.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nearbyintf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nearbyintl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_nextafterl.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_remquo.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_remquof.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_remquol.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_rint.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_rintf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_rintl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_scalbln.c
s_scalblnf.c
s_scalblnl.c
s_scalbn.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_scalbnf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_scalbnl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_significand.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_significandf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_significandl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_trunc.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_truncf.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
s_truncl.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Versions
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
w_sqrt_compat.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00
w_sqrt.c Add narrowing square root functions 2021-09-10 20:56:22 +00:00