diff options
79 files changed, 5736 insertions, 92 deletions
@@ -19,6 +19,13 @@ Major new features: in various downstream distributions. The locale is not built into glibc, and must be installed. +* <math.h> functions that round their results to a narrower type, and + corresponding <tgmath.h> macros, are added from TS 18661-1:2014, TS + 18661-3:2015 and draft ISO C2X: + + - fsqrt, fsqrtl, dsqrtl and corresponding fMsqrtfN, fMsqrtfNx, + fMxsqrtfN and fMxsqrtfNx functions. + Deprecated and removed features, and other changes affecting compatibility: [Add deprecations, removals and changes affecting compatibility here] diff --git a/manual/arith.texi b/manual/arith.texi index 75eaf67fe7..edf1fd71f8 100644 --- a/manual/arith.texi +++ b/manual/arith.texi @@ -2270,6 +2270,25 @@ function without any intermediate rounding to the type of the arguments. @end deftypefun +@deftypefun float fsqrt (double @var{x}) +@deftypefunx float fsqrtl (long double @var{x}) +@deftypefunx double dsqrtl (long double @var{x}) +@deftypefunx _FloatM fMsqrtfN (_Float@var{N} @var{x}) +@deftypefunx _FloatM fMsqrtfNx (_Float@var{N}x @var{x}) +@deftypefunx _FloatMx fMxsqrtfN (_Float@var{N} @var{x}) +@deftypefunx _FloatMx fMxsqrtfNx (_Float@var{N}x @var{x}) +@standards{TS 18661-1:2014, math.h} +@standardsx{fMsqrtfN, TS 18661-3:2015, math.h} +@standardsx{fMsqrtfNx, TS 18661-3:2015, math.h} +@standardsx{fMxsqrtfN, TS 18661-3:2015, math.h} +@standardsx{fMxsqrtfNx, TS 18661-3:2015, math.h} +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} +These functions, from TS 18661-1:2014 and TS 18661-3:2015, return the +square root of @var{x}, rounded once to the return type of the +function without any intermediate rounding to the type of the +arguments. +@end deftypefun + @node Complex Numbers @section Complex Numbers @pindex complex.h diff --git a/math/Makefile b/math/Makefile index ceb1eb2085..987e9841f9 100644 --- a/math/Makefile +++ b/math/Makefile @@ -91,7 +91,7 @@ libm-compat-calls = \ w_lgammaF_r_compat w_lgammaF_compat2 w_expF_compat \ w_lgamma_compatF k_standardF -libm-narrow-fns = add div mul sub +libm-narrow-fns = add div mul sqrt sub libm-narrow-types-basic = s_fF s_f32xFf64 libm-narrow-types-ldouble-yes = s_fFl s_dFl libm-narrow-types-float128-yes = s_f32Ff128 s_f64Ff128 s_f64xFf128 @@ -299,7 +299,7 @@ libm-test-funcs-noauto = canonicalize ceil cimag conj copysign cproj creal \ significand totalorder totalordermag trunc ufromfp \ ufromfpx compat_totalorder compat_totalordermag libm-test-funcs-compat = compat_totalorder compat_totalordermag -libm-test-funcs-narrow = add div mul sub +libm-test-funcs-narrow = add div mul sqrt sub libm-test-funcs-all = $(libm-test-funcs-auto) $(libm-test-funcs-noauto) libm-test-c-auto = $(foreach f,$(libm-test-funcs-auto),libm-test-$(f).c) libm-test-c-noauto = $(foreach f,$(libm-test-funcs-noauto),libm-test-$(f).c) @@ -664,6 +664,7 @@ CFLAGS-s_ctanh.c += -fno-builtin-ctanhl CFLAGS-s_dadd.c += -fno-builtin-daddl CFLAGS-s_ddiv.c += -fno-builtin-ddivl CFLAGS-s_dmul.c += -fno-builtin-dmull +CFLAGS-s_dsqrt.c += -fno-builtin-dsqrtl CFLAGS-s_dsub.c += -fno-builtin-dsubl CFLAGS-s_erf.c += -fno-builtin-erfl CFLAGS-s_erfc.c += -fno-builtin-erfcl @@ -687,6 +688,7 @@ CFLAGS-s_fmul.c += -fno-builtin-fmull CFLAGS-s_frexp.c += -fno-builtin-frexpl CFLAGS-s_fromfp.c += -fno-builtin-fromfpl CFLAGS-s_fromfpx.c += -fno-builtin-fromfpxl +CFLAGS-s_fsqrt.c += -fno-builtin-fsqrtl CFLAGS-s_fsub.c += -fno-builtin-fsubl CFLAGS-s_gamma.c += -fno-builtin-gammal CFLAGS-s_getpayload.c += -fno-builtin-getpayloadl diff --git a/math/Versions b/math/Versions index 5b3c321490..b121b454cd 100644 --- a/math/Versions +++ b/math/Versions @@ -593,4 +593,13 @@ libm { GLIBC_2.32 { exp10f; } + GLIBC_2.35 { + # Functions not involving _Float64x or _Float128, for all configurations. + fsqrt; fsqrtl; dsqrtl; + f32sqrtf32x; f32sqrtf64; f32xsqrtf64; + # Functions involving _Float64x or _Float128, for some configurations. + f32sqrtf64x; f32sqrtf128; + f32xsqrtf64x; f32xsqrtf128; f64sqrtf64x; f64sqrtf128; |
