diff options
-rw-r--r-- | ChangeLog | 63 | ||||
-rw-r--r-- | manual/arith.texi | 286 | ||||
-rw-r--r-- | manual/math.texi | 276 |
3 files changed, 576 insertions, 49 deletions
@@ -1,3 +1,66 @@ +2017-06-23 Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com> + + * manual/arith.texi (Infinity and NaN): Document SNANFN and SNANFNx. + (Error Reporting by Mathematical Functions): Document HUGE_VAL_FN + and HUGE_VAL_FNx. + (Absolute Value): Document fabsfN, fabsfNx, cabsfN, cabsfNx. + Rephrase the paragraph that mentions that fabs, fabsf, and fabsl + are in math.h, to avoid having to list the _FloatN and _FloatNx + variants as well. Likewise for the cabs functions. + (Normalization Functions): Document frexpfN, frexpfNx, ldexpfN, + ldexpfNx, scalbnfN, scalbnfNx, scalblnfN, scalblnfNx. + Mention that _FloatN and _FloatNx variants of scalbn and scalbln + come from TS 18661-3, since this section explicitly states that + these functions come from BSD. + (Rounding Functions): Document ceilfN, ceilfNx, floorfN, floorfNx, + truncfN, truncfNx, rintfN, rintfNx, nearbyintfN, nearbyintfNx, + roundfN, roundfNx, roundevenfN, roundevenfNx, lrintfN, lrintfNx, + llrintfN, llrintfNx, lroundfN, lroundfNx, llroundfN, llroundfNx, + fromfpfN, fromfpfNx, ufromfpfN, ufromfpfNx, fromfpxfN, fromfpxfNx, + ufromfpxfN, ufromfpxfNx, modffN, modffNx. + (Remainder Functions): Document fmodfN, fmodfNx, remainderfN, + remainderfNx. + (Setting and modifying single bits of FP values): Document + copysignfN, copysignfNx, nextafterfN, nextafterfNx, nextupfN, + nextupfNx, nextdownfN, nextdownfNx, nanfN, nanfNx, canonicalizefN, + canonicalizefNx, getpayloadfN, getpayloadfNx, setpayloadfN, + setpayloadfNx, setpayloadsigfN, setpayloadsigfNx. + (Floating-Point Comparison Functions): Document totalorderfN, + totalorderfNx, totalordermagfN, totalordermagfNx. + (Miscellaneous FP arithmetic functions): Document fminfN, fminfNx, + fmaxfN, fmaxfNx, fminmagfN, fminmagfNx, fmaxmagfN, fmaxmagfNx, + fdimfN, fdimfNx, fmafN, fmafNx. + (Complex Numbers): Document the complex types: _FloatN complex and + _FloatNx complex. + (rojections, Conjugates, and Decomposing of Complex Numbers): + Document crealfN, crealfNx, cimagfN, cimagfNx, conjfN, conjfNx, + cargfN, cargfNx, cprojfN, cprojfNx. + * manual/math.texi (Mathematics): Mention that the _FloatN and + _FloatNx variants of the math functions come from TS 18661-3, + unless otherwise stated. + (Predefined Mathematical Constants): Document the _FloatN and + _FloatNx variants of the macros prefixed with M_. + (Trigonometric Functions): Document sinfN, sinfNx, cosfN, cosfNx, + tanfN, tanfNx, sincosfN, sincosfNx, csinfN, csinfNx, ccosfN, + ccosfNx, ctanfN, ctanfNx. + (Inverse Trigonometric Functions): Document asinfN, asinfNx, + acosfN, acosfNx, atanfN, atanfNx, atan2fN, atan2fNx. + (Exponentiation and Logarithms): Document expfN, expfNx, exp2fN, + exp2fNx, exp10fN, exp10fNx, logfN, logfNx, log10fN, log10fNx, + log2fN, log2fNx, logbfN, logbfNx, ilogbfN, ilogbfNx, llogbfN, + llogbfNx, powfN, powfNx, sqrtfN, sqrtfNx, cbrtfN, cbrtfNx, hypotfN, + hypotfNx, expm1fN, expm1fNx, log1pfN, log1pfNx, cexpfN, cexpfNx, + clogfN, clogfNx, clog10fN, clog10fNx, csqrtfN, csqrtfNx, cpowfN, + cpowfNx. + (Hyperbolic Functions): sinhfN, sinhfNx, coshfN, coshfNx, tanhfN, + tanhfNx, csinhfN, csinhfNx, ccoshfN, ccoshfNx, ctanhfN, ctanhfNx, + asinhfN, asinhfNx, acoshfN, acoshfNx, atanhfN, atanhfNx, casinhfN, + casinhfNx, cacoshfN, cacoshfNx, catanhfN, catanhfNx. + (Special Functions): Document erffN, erffNx, erfcfN, erfcfNx, + lgammafN, lgammafNx, lgammarfN_r, lgammafNx_r, tgammafN, tgammafNx, + j0fN, j0fNx, j1fN, j1fNx, jnfN, jnfNx, y0fN, y0fNx, y1fN, y1fNx, + ynfN, ynfNx. + 2017-06-23 Florian Weimer <fweimer@redhat.com> * sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S (between_2_3): Fix typo in comment. diff --git a/manual/arith.texi b/manual/arith.texi index e403cb51cd..28a0e134d5 100644 --- a/manual/arith.texi +++ b/manual/arith.texi @@ -686,9 +686,13 @@ such as by defining @code{_GNU_SOURCE}, and then you must include @deftypevr Macro float SNANF @deftypevrx Macro double SNAN @deftypevrx Macro {long double} SNANL +@deftypevrx Macro _FloatN SNANFN +@deftypevrx Macro _FloatNx SNANFNx @standards{TS 18661-1:2014, math.h} -These macros, defined by TS 18661-1:2014, are constant expressions for -signaling NaNs. +@standardsx{SNANFN, TS 18661-3:2015, math.h} +@standardsx{SNANFNx, TS 18661-3:2015, math.h} +These macros, defined by TS 18661-1:2014 and TS 18661-3:2015, are +constant expressions for signaling NaNs. @end deftypevr @deftypevr Macro int FE_SNANS_ALWAYS_SIGNAL @@ -917,7 +921,11 @@ to test for overflow on both old and new hardware. @deftypevr Macro double HUGE_VAL @deftypevrx Macro float HUGE_VALF @deftypevrx Macro {long double} HUGE_VALL +@deftypevrx Macro _FloatN HUGE_VAL_FN +@deftypevrx Macro _FloatNx HUGE_VAL_FNx @standards{ISO, math.h} +@standardsx{HUGE_VAL_FN, TS 18661-3:2015, math.h} +@standardsx{HUGE_VAL_FNx, TS 18661-3:2015, math.h} An expression representing a particular very large number. On machines that use @w{IEEE 754} floating point format, @code{HUGE_VAL} is infinity. On other machines, it's typically the largest positive number that can @@ -1229,8 +1237,8 @@ whose imaginary part is @var{y}, the absolute value is @w{@code{sqrt @pindex stdlib.h Prototypes for @code{abs}, @code{labs} and @code{llabs} are in @file{stdlib.h}; @code{imaxabs} is declared in @file{inttypes.h}; -@code{fabs}, @code{fabsf} and @code{fabsl} are declared in @file{math.h}. -@code{cabs}, @code{cabsf} and @code{cabsl} are declared in @file{complex.h}. +the @code{fabs} functions are declared in @file{math.h}; +the @code{cabs} functions are declared in @file{complex.h}. @deftypefun int abs (int @var{number}) @deftypefunx {long int} labs (long int @var{number}) @@ -1254,7 +1262,11 @@ See @ref{Integers} for a description of the @code{intmax_t} type. @deftypefun double fabs (double @var{number}) @deftypefunx float fabsf (float @var{number}) @deftypefunx {long double} fabsl (long double @var{number}) +@deftypefunx _FloatN fabsfN (_Float@var{N} @var{number}) +@deftypefunx _FloatNx fabsfNx (_Float@var{N}x @var{number}) @standards{ISO, math.h} +@standardsx{fabsfN, TS 18661-3:2015, math.h} +@standardsx{fabsfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} This function returns the absolute value of the floating-point number @var{number}. @@ -1263,7 +1275,11 @@ This function returns the absolute value of the floating-point number @deftypefun double cabs (complex double @var{z}) @deftypefunx float cabsf (complex float @var{z}) @deftypefunx {long double} cabsl (complex long double @var{z}) +@deftypefunx _FloatN cabsfN (complex _Float@var{N} @var{z}) +@deftypefunx _FloatNx cabsfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{cabsfN, TS 18661-3:2015, complex.h} +@standardsx{cabsfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the absolute value of the complex number @var{z} (@pxref{Complex Numbers}). The absolute value of a complex number is: @@ -1296,7 +1312,11 @@ All these functions are declared in @file{math.h}. @deftypefun double frexp (double @var{value}, int *@var{exponent}) @deftypefunx float frexpf (float @var{value}, int *@var{exponent}) @deftypefunx {long double} frexpl (long double @var{value}, int *@var{exponent}) +@deftypefunx _FloatN frexpfN (_Float@var{N} @var{value}, int *@var{exponent}) +@deftypefunx _FloatNx frexpfNx (_Float@var{N}x @var{value}, int *@var{exponent}) @standards{ISO, math.h} +@standardsx{frexpfN, TS 18661-3:2015, math.h} +@standardsx{frexpfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions are used to split the number @var{value} into a normalized fraction and an exponent. @@ -1317,7 +1337,11 @@ zero is stored in @code{*@var{exponent}}. @deftypefun double ldexp (double @var{value}, int @var{exponent}) @deftypefunx float ldexpf (float @var{value}, int @var{exponent}) @deftypefunx {long double} ldexpl (long double @var{value}, int @var{exponent}) +@deftypefunx _FloatN ldexpfN (_Float@var{N} @var{value}, int @var{exponent}) +@deftypefunx _FloatNx ldexpfNx (_Float@var{N}x @var{value}, int @var{exponent}) @standards{ISO, math.h} +@standardsx{ldexpfN, TS 18661-3:2015, math.h} +@standardsx{ldexpfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the result of multiplying the floating-point number @var{value} by 2 raised to the power @var{exponent}. (It can @@ -1330,6 +1354,8 @@ For example, @code{ldexp (0.8, 4)} returns @code{12.8}. The following functions, which come from BSD, provide facilities equivalent to those of @code{ldexp} and @code{frexp}. See also the @w{ISO C} function @code{logb} which originally also appeared in BSD. +The @code{_Float@var{N}} and @code{_Float@var{N}} variants of the +following functions come from TS 18661-3:2015. @deftypefun double scalb (double @var{value}, double @var{exponent}) @deftypefunx float scalbf (float @var{value}, float @var{exponent}) @@ -1342,7 +1368,11 @@ The @code{scalb} function is the BSD name for @code{ldexp}. @deftypefun double scalbn (double @var{x}, int @var{n}) @deftypefunx float scalbnf (float @var{x}, int @var{n}) @deftypefunx {long double} scalbnl (long double @var{x}, int @var{n}) +@deftypefunx _FloatN scalbnfN (_Float@var{N} @var{x}, int @var{n}) +@deftypefunx _FloatNx scalbnfNx (_Float@var{N}x @var{x}, int @var{n}) @standards{BSD, math.h} +@standardsx{scalbnfN, TS 18661-3:2015, math.h} +@standardsx{scalbnfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{scalbn} is identical to @code{scalb}, except that the exponent @var{n} is an @code{int} instead of a floating-point number. @@ -1351,7 +1381,11 @@ The @code{scalb} function is the BSD name for @code{ldexp}. @deftypefun double scalbln (double @var{x}, long int @var{n}) @deftypefunx float scalblnf (float @var{x}, long int @var{n}) @deftypefunx {long double} scalblnl (long double @var{x}, long int @var{n}) +@deftypefunx _FloatN scalblnfN (_Float@var{N} @var{x}, long int @var{n}) +@deftypefunx _FloatNx scalblnfNx (_Float@var{N}x @var{x}, long int @var{n}) @standards{BSD, math.h} +@standardsx{scalblnfN, TS 18661-3:2015, math.h} +@standardsx{scalblnfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{scalbln} is identical to @code{scalb}, except that the exponent @var{n} is a @code{long int} instead of a floating-point number. @@ -1416,7 +1450,11 @@ Round to nearest, ties round to even. @deftypefun double ceil (double @var{x}) @deftypefunx float ceilf (float @var{x}) @deftypefunx {long double} ceill (long double @var{x}) +@deftypefunx _FloatN ceilfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx ceilfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{ceilfN, TS 18661-3:2015, math.h} +@standardsx{ceilfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions round @var{x} upwards to the nearest integer, returning that value as a @code{double}. Thus, @code{ceil (1.5)} @@ -1426,7 +1464,11 @@ is @code{2.0}. @deftypefun double floor (double @var{x}) @deftypefunx float floorf (float @var{x}) @deftypefunx {long double} floorl (long double @var{x}) +@deftypefunx _FloatN floorfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx floorfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{floorfN, TS 18661-3:2015, math.h} +@standardsx{floorfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions round @var{x} downwards to the nearest integer, returning that value as a @code{double}. Thus, @code{floor @@ -1436,7 +1478,11 @@ integer, returning that value as a @code{double}. Thus, @code{floor @deftypefun double trunc (double @var{x}) @deftypefunx float truncf (float @var{x}) @deftypefunx {long double} truncl (long double @var{x}) +@deftypefunx _FloatN truncfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx truncfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{truncfN, TS 18661-3:2015, math.h} +@standardsx{truncfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{trunc} functions round @var{x} towards zero to the nearest integer (returned in floating-point format). Thus, @code{trunc (1.5)} @@ -1446,7 +1492,11 @@ is @code{1.0} and @code{trunc (-1.5)} is @code{-1.0}. @deftypefun double rint (double @var{x}) @deftypefunx float rintf (float @var{x}) @deftypefunx {long double} rintl (long double @var{x}) +@deftypefunx _FloatN rintfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx rintfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{rintfN, TS 18661-3:2015, math.h} +@standardsx{rintfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions round @var{x} to an integer value according to the current rounding mode. @xref{Floating Point Parameters}, for @@ -1462,7 +1512,11 @@ inexact exception. @deftypefun double nearbyint (double @var{x}) @deftypefunx float nearbyintf (float @var{x}) @deftypefunx {long double} nearbyintl (long double @var{x}) +@deftypefunx _FloatN nearbyintfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx nearbyintfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{nearbyintfN, TS 18661-3:2015, math.h} +@standardsx{nearbyintfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the same value as the @code{rint} functions, but do not raise the inexact exception if @var{x} is not an integer. @@ -1471,7 +1525,11 @@ do not raise the inexact exception if @var{x} is not an integer. @deftypefun double round (double @var{x}) @deftypefunx float roundf (float @var{x}) @deftypefunx {long double} roundl (long double @var{x}) +@deftypefunx _FloatN roundfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx roundfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{roundfN, TS 18661-3:2015, math.h} +@standardsx{roundfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions are similar to @code{rint}, but they round halfway cases away from zero instead of to the nearest integer (or other @@ -1481,16 +1539,25 @@ current rounding mode). @deftypefun double roundeven (double @var{x}) @deftypefunx float roundevenf (float @var{x}) @deftypefunx {long double} roundevenl (long double @var{x}) +@deftypefunx _FloatN roundevenfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx roundevenfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{roundevenfN, TS 18661-3:2015, math.h} +@standardsx{roundevenfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} -These functions, from TS 18661-1:2014, are similar to @code{round}, -but they round halfway cases to even instead of away from zero. +These functions, from TS 18661-1:2014 and TS 18661-3:2015, are similar +to @code{round}, but they round halfway cases to even instead of away +from zero. @end deftypefun @deftypefun {long int} lrint (double @var{x}) @deftypefunx {long int} lrintf (float @var{x}) @deftypefunx {long int} lrintl (long double @var{x}) +@deftypefunx {long int} lrintfN (_Float@var{N} @var{x}) +@deftypefunx {long int} lrintfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{lrintfN, TS 18661-3:2015, math.h} +@standardsx{lrintfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions are just like @code{rint}, but they return a @code{long int} instead of a floating-point number. @@ -1499,7 +1566,11 @@ These functions are just like @code{rint}, but they return a @deftypefun {long long int} llrint (double @var{x}) @deftypefunx {long long int} llrintf (float @var{x}) @deftypefunx {long long int} llrintl (long double @var{x}) +@deftypefunx {long long int} llrintfN (_Float@var{N} @var{x}) +@deftypefunx {long long int} llrintfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{llrintfN, TS 18661-3:2015, math.h} +@standardsx{llrintfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions are just like @code{rint}, but they return a @code{long long int} instead of a floating-point number. @@ -1508,7 +1579,11 @@ These functions are just like @code{rint}, but they return a @deftypefun {long int} lround (double @var{x}) @deftypefunx {long int} lroundf (float @var{x}) @deftypefunx {long int} lroundl (long double @var{x}) +@deftypefunx {long int} lroundfN (_Float@var{N} @var{x}) +@deftypefunx {long int} lroundfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{lroundfN, TS 18661-3:2015, math.h} +@standardsx{lroundfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions are just like @code{round}, but they return a @code{long int} instead of a floating-point number. @@ -1517,7 +1592,11 @@ These functions are just like @code{round}, but they return a @deftypefun {long long int} llround (double @var{x}) @deftypefunx {long long int} llroundf (float @var{x}) @deftypefunx {long long int} llroundl (long double @var{x}) +@deftypefunx {long long int} llroundfN (_Float@var{N} @var{x}) +@deftypefunx {long long int} llroundfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{llroundfN, TS 18661-3:2015, math.h} +@standardsx{llroundfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions are just like @code{round}, but they return a @code{long long int} instead of a floating-point number. @@ -1526,27 +1605,43 @@ These functions are just like @code{round}, but they return a @deftypefun intmax_t fromfp (double @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx intmax_t fromfpf (float @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx intmax_t fromfpl (long double @var{x}, int @var{round}, unsigned int @var{width}) +@deftypefunx intmax_t fromfpfN (_Float@var{N} @var{x}, int @var{round}, unsigned int @var{width}) +@deftypefunx intmax_t fromfpfNx (_Float@var{N}x @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx uintmax_t ufromfp (double @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx uintmax_t ufromfpf (float @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx uintmax_t ufromfpl (long double @var{x}, int @var{round}, unsigned int @var{width}) +@deftypefunx uintmax_t ufromfpfN (_Float@var{N} @var{x}, int @var{round}, unsigned int @var{width}) +@deftypefunx uintmax_t ufromfpfNx (_Float@var{N}x @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx intmax_t fromfpx (double @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx intmax_t fromfpxf (float @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx intmax_t fromfpxl (long double @var{x}, int @var{round}, unsigned int @var{width}) +@deftypefunx intmax_t fromfpxfN (_Float@var{N} @var{x}, int @var{round}, unsigned int @var{width}) +@deftypefunx intmax_t fromfpxfNx (_Float@var{N}x @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx uintmax_t ufromfpx (double @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx uintmax_t ufromfpxf (float @var{x}, int @var{round}, unsigned int @var{width}) @deftypefunx uintmax_t ufromfpxl (long double @var{x}, int @var{round}, unsigned int @var{width}) +@deftypefunx uintmax_t ufromfpxfN (_Float@var{N} @var{x}, int @var{round}, unsigned int @var{width}) +@deftypefunx uintmax_t ufromfpxfNx (_Float@var{N}x @var{x}, int @var{round}, unsigned int @var{width}) @standards{ISO, math.h} -@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} -These functions, from TS 18661-1:2014, convert a floating-point number -to an integer according to the rounding direction @var{round} (one of -the @code{FP_INT_*} macros). If the integer is outside the range of a -signed or unsigned (depending on the return type of the function) type -of width @var{width} bits (or outside the range of the return type, if -@var{width} is larger), or if @var{x} is infinite or NaN, or if -@var{width} is zero, a domain error occurs and an unspecified value is -returned. The functions with an @samp{x} in their names raise the -inexact exception when a domain error does not occur and the argument -is not an integer; the other functions do not raise the inexact +@standardsx{fromfpfN, TS 18661-3:2015, math.h} +@standardsx{fromfpfNx, TS 18661-3:2015, math.h} +@standardsx{ufromfpfN, TS 18661-3:2015, math.h} +@standardsx{ufromfpfNx, TS 18661-3:2015, math.h} +@standardsx{fromfpxfN, TS 18661-3:2015, math.h} +@standardsx{fromfpxfNx, TS 18661-3:2015, math.h} +@standardsx{ufromfpxfN, TS 18661-3:2015, math.h} +@standardsx{ufromfpxfNx, TS 18661-3:2015, math.h} +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} +These functions, from TS 18661-1:2014 and TS 18661-3:2015, convert a +floating-point number to an integer according to the rounding direction +@var{round} (one of the @code{FP_INT_*} macros). If the integer is +outside the range of a signed or unsigned (depending on the return type +of the function) type of width @var{width} bits (or outside the range of +the return type, if @var{width} is larger), or if @var{x} is infinite or +NaN, or if @var{width} is zero, a domain error occurs and an unspecified +value is returned. The functions with an @samp{x} in their names raise +the inexact exception when a domain error does not occur and the +argument is not an integer; the other functions do not raise the inexact exception. @end deftypefun @@ -1554,7 +1649,11 @@ exception. @deftypefun double modf (double @var{value}, double *@var{integer-part}) @deftypefunx float modff (float @var{value}, float *@var{integer-part}) @deftypefunx {long double} modfl (long double @var{value}, long double *@var{integer-part}) +@deftypefunx _FloatN modffN (_Float@var{N} @var{value}, _Float@var{N} *@var{integer-part}) +@deftypefunx _FloatNx modffNx (_Float@var{N}x @var{value}, _Float@var{N}x *@var{integer-part}) @standards{ISO, math.h} +@standardsx{modffN, TS 18661-3:2015, math.h} +@standardsx{modffNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions break the argument @var{value} into an integer part and a fractional part (between @code{-1} and @code{1}, exclusive). Their sum @@ -1576,7 +1675,11 @@ suits your problem. @deftypefun double fmod (double @var{numerator}, double @var{denominator}) @deftypefunx float fmodf (float @var{numerator}, float @var{denominator}) @deftypefunx {long double} fmodl (long double @var{numerator}, long double @var{denominator}) +@deftypefunx _FloatN fmodfN (_Float@var{N} @var{numerator}, _Float@var{N} @var{denominator}) +@deftypefunx _FloatNx fmodfNx (_Float@var{N}x @var{numerator}, _Float@var{N}x @var{denominator}) @standards{ISO, math.h} +@standardsx{fmodfN, TS 18661-3:2015, math.h} +@standardsx{fmodfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions compute the remainder from the division of @var{numerator} by @var{denominator}. Specifically, the return value is @@ -1594,7 +1697,11 @@ If @var{denominator} is zero, @code{fmod} signals a domain error. @deftypefun double remainder (double @var{numerator}, double @var{denominator}) @deftypefunx float remainderf (float @var{numerator}, float @var{denominator}) @deftypefunx {long double} remainderl (long double @var{numerator}, long double @var{denominator}) +@deftypefunx _FloatN remainderfN (_Float@var{N} @var{numerator}, _Float@var{N} @var{denominator}) +@deftypefunx _FloatNx remainderfNx (_Float@var{N}x @var{numerator}, _Float@var{N}x @var{denominator}) @standards{ISO, math.h} +@standardsx{remainderfN, TS 18661-3:2015, math.h} +@standardsx{remainderfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions are like @code{fmod} except that they round the internal quotient @var{n} to the nearest integer instead of towards zero @@ -1630,7 +1737,11 @@ bits. @deftypefun double copysign (double @var{x}, double @var{y}) @deftypefunx float copysignf (float @var{x}, float @var{y}) @deftypefunx {long double} copysignl (long double @var{x}, long double @var{y}) +@deftypefunx _FloatN copysignfN (_Float@var{N} @var{x}, _Float@var{N} @var{y}) +@deftypefunx _FloatNx copysignfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}) @standards{ISO, math.h} +@standardsx{copysignfN, TS 18661-3:2015, math.h} +@standardsx{copysignfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return @var{x} but with the sign of @var{y}. They work even if @var{x} or @var{y} are NaN or zero. Both of these can carry a @@ -1659,7 +1770,11 @@ false, but @code{signbit (-0.0)} will return a nonzero value. @deftypefun double nextafter (double @var{x}, double @var{y}) @deftypefunx float nextafterf (float @var{x}, float @var{y}) @deftypefunx {long double} nextafterl (long double @var{x}, long double @var{y}) +@deftypefunx _FloatN nextafterfN (_Float@var{N} @var{x}, _Float@var{N} @var{y}) +@deftypefunx _FloatNx nextafterfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}) @standards{ISO, math.h} +@standardsx{nextafterfN, TS 18661-3:2015, math.h} +@standardsx{nextafterfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{nextafter} function returns the next representable neighbor of @var{x} in the direction towards @var{y}. The size of the step between @@ -1688,7 +1803,11 @@ double}. @deftypefun double nextup (double @var{x}) @deftypefunx float nextupf (float @var{x}) @deftypefunx {long double} nextupl (long double @var{x}) +@deftypefunx _FloatN nextupfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx nextupfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{nextupfN, TS 18661-3:2015, math.h} +@standardsx{nextupfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{nextup} function returns the next representable neighbor of @var{x} in the direction of positive infinity. If @var{x} is the smallest negative @@ -1696,14 +1815,18 @@ subnormal number in the type of @var{x} the function returns @code{-0}. If @math{@var{x} = @code{0}} the function returns the smallest positive subnormal number in the type of @var{x}. If @var{x} is NaN, NaN is returned. If @var{x} is @math{+@infinity{}}, @math{+@infinity{}} is returned. -@code{nextup} is from TS 18661-1:2014. +@code{nextup} is from TS 18661-1:2014 and TS 18661-3:2015. @code{nextup} never raises an exception except for signaling NaNs. @end deftypefun @deftypefun double nextdown (double @var{x}) @deftypefunx float nextdownf (float @var{x}) @deftypefunx {long double} nextdownl (long double @var{x}) +@deftypefunx _FloatN nextdownfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx nextdownfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{nextdownfN, TS 18661-3:2015, math.h} +@standardsx{nextdownfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{nextdown} function returns the next representable neighbor of @var{x} in the direction of negative infinity. If @var{x} is the smallest positive @@ -1711,7 +1834,7 @@ subnormal number in the type of @var{x} the function returns @code{+0}. If @math{@var{x} = @code{0}} the function returns the smallest negative subnormal number in the type of @var{x}. If @var{x} is NaN, NaN is returned. If @var{x} is @math{-@infinity{}}, @math{-@infinity{}} is returned. -@code{nextdown} is from TS 18661-1:2014. +@code{nextdown} is from TS 18661-1:2014 and TS 18661-3:2015. @code{nextdown} never raises an exception except for signaling NaNs. @end deftypefun @@ -1719,7 +1842,11 @@ If @var{x} is @math{-@infinity{}}, @math{-@infinity{}} is returned. @deftypefun double nan (const char *@var{tagp}) @deftypefunx float nanf (const char *@var{tagp}) @deftypefunx {long double} nanl (const char *@var{tagp}) +@deftypefunx _FloatN nanfN (const char *@var{tagp}) +@deftypefunx _FloatNx nanfNx (const char *@var{tagp}) @standards{ISO, math.h} +@standardsx{nanfN, TS 18661-3:2015, math.h} +@standardsx{nanfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}} @c The unsafe-but-ruled-safe locale use comes from strtod. The @code{nan} function returns a representation of NaN, provided that @@ -1735,13 +1862,17 @@ selects one. On other systems it may do nothing. @deftypefun int canonicalize (double *@var{cx}, const double *@var{x}) @deftypefunx int canonicalizef (float *@var{cx}, const float *@var{x}) @deftypefunx int canonicalizel (long double *@var{cx}, const long double *@var{x}) +@deftypefunx int canonicalizefN (_Float@var{N} *@var{cx}, const _Float@var{N} *@var{x}) +@deftypefunx int canonicalizefNx (_Float@var{N}x *@var{cx}, const _Float@var{N}x *@var{x}) @standards{ISO, math.h} +@standardsx{canonicalizefN, TS 18661-3:2015, math.h} +@standardsx{canonicalizefNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} In some floating-point formats, some values have canonical (preferred) and noncanonical encodings (for IEEE interchange binary formats, all encodings are canonical). These functions, defined by TS -18661-1:2014, attempt to produce a canonical version of the -floating-point value pointed to by @var{x}; if that value is a +18661-1:2014 and TS 18661-3:2015, attempt to produce a canonical version +of the floating-point value pointed to by @var{x}; if that value is a signaling NaN, they raise the invalid exception and produce a quiet NaN. If a canonical value is produced, it is stored in the object pointed to by @var{cx}, and these functions return zero. Otherwise @@ -1760,42 +1891,56 @@ produced as output. @deftypefun double getpayload (const double *@var{x}) @deftypefunx float getpayloadf (const float *@var{x}) @deftypefunx {long double} getpayloadl (const long double *@var{x}) +@deftypefunx _FloatN getpayloadfN (const _Float@var{N} *@var{x}) +@deftypefunx _FloatNx getpayloadfNx (const _Float@var{N}x *@var{x}) @standards{ISO, math.h} +@standardsx{getpayloadfN, TS 18661-3:2015, math.h} +@standardsx{getpayloadfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} IEEE 754 defines the @dfn{payload} of a NaN to be an integer value encoded in the representation of the NaN. Payloads are typically propagated from NaN inputs to the result of a floating-point -operation. These functions, defined by TS 18661-1:2014, return the -payload of the NaN pointed to by @var{x} (returned as a positive -integer, or positive zero, represented as a floating-point number); if -@var{x} is not a NaN, they return an unspecified value. They raise no -floating-point exceptions even for signaling NaNs. +operation. These functions, defined by TS 18661-1:2014 and TS +18661-3:2015, return the payload of the NaN pointed to by @var{x} +(returned as a positive integer, or positive zero, represented as a +floating-point number); if @var{x} is not a NaN, they return an +unspecified value. They raise no floating-point exceptions even for +signaling NaNs. @end deftypefun @deftypefun int setpayload (double *@var{x}, double @var{payload}) @deftypefunx int setpayloadf (float *@var{x}, float @var{payload}) @deftypefunx int setpayloadl (long double *@var{x}, long double @var{payload}) +@deftypefunx int setpayloadfN (_Float@var{N} *@var{x}, _Float@var{N} @var{payload}) +@deftypefunx int setpayloadfNx (_Float@var{N}x *@var{x}, _Float@var{N}x @var{payload}) @standards{ISO, math.h} +@standardsx{setpayloadfN, TS 18661-3:2015, math.h} +@standardsx{setpayloadfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} -These functions, defined by TS 18661-1:2014, set the object pointed to -by @var{x} to a quiet NaN with payload @var{payload} and a zero sign -bit and return zero. If @var{payload} is not a positive-signed -integer that is a valid payload for a quiet NaN of the given type, the -object pointed to by @var{x} is set to positive zero and a nonzero -value is returned. They raise no floating-point exceptions. +These functions, defined by TS 18661-1:2014 and TS 18661-3:2015, set the +object pointed to by @var{x} to a quiet NaN with payload @var{payload} +and a zero sign bit and return zero. If @var{payload} is not a +positive-signed integer that is a valid payload for a quiet NaN of the +given type, the object pointed to by @var{x} is set to positive zero and +a nonzero value is returned. They raise no floating-point exceptions. @end deftypefun @deftypefun int setpayloadsig (double *@var{x}, double @var{payload}) @deftypefunx int setpayloadsigf (float *@var{x}, float @var{payload}) @deftypefunx int setpayloadsigl (long double *@var{x}, long double @var{payload}) +@deftypefunx int setpayloadsigfN (_Float@var{N} *@var{x}, _Float@var{N} @var{payload}) +@deftypefunx int setpayloadsigfNx (_Float@var{N}x *@var{x}, _Float@var{N}x @var{payload}) @standards{ISO, math.h} +@standardsx{setpayloadsigfN, TS 18661-3:2015, math.h} +@standardsx{setpayloadsigfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} -These functions, defined by TS 18661-1:2014, set the object pointed to -by @var{x} to a signaling NaN with payload @var{payload} and a zero -sign bit and return zero. If @var{payload} is not a positive-signed -integer that is a valid payload for a signaling NaN of the given type, -the object pointed to by @var{x} is set to positive zero and a nonzero -value is returned. They raise no floating-point exceptions. +These functions, defined by TS 18661-1:2014 and TS 18661-3:2015, set the +object pointed to by @var{x} to a signaling NaN with payload +@var{payload} and a zero sign bit and return zero. If @var{payload} is +not a positive-signed integer that is a valid payload for a signaling +NaN of the given type, the object pointed to by @var{x} is set to +positive zero and a nonzero value is returned. They raise no +floating-point exceptions. @end deftypefun @node FP Comparison Functions @@ -1886,7 +2031,11 @@ NaN. @deftypefun int totalorder (double @var{x}, double @var{y}) @deftypefunx int totalorderf (float @var{x}, float @var{y}) @deftypefunx int totalorderl (long double @var{x}, long double @var{y}) +@deftypefunx int totalorderfN (_Float@var{N} @var{x}, _Float@var{N} @var{y}) +@deftypefunx int totalorderfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}) @standards{TS 18661-1:2014, math.h} +@standardsx{totalorderfN, TS 18661-3:2015, math.h} +@standardsx{totalorderfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions determine whether the total order relationship, defined in IEEE 754-2008, is true for @var{x} and @var{y}, returning @@ -1905,7 +2054,11 @@ payload. @deftypefun int totalordermag (double @var{x}, double @var{y}) @deftypefunx int totalordermagf (float @var{x}, float @var{y}) @deftypefunx int totalordermagl (long double @var{x}, long double @var{y}) +@deftypefunx int totalordermagfN (_Float@var{N} @var{x}, _Float@var{N} @var{y}) +@deftypefunx int totalordermagfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}) @standards{TS 18661-1:2014, math.h} +@standardsx{totalordermagfN, TS 18661-3:2015, math.h} +@standardsx{totalordermagfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions determine whether the total order relationship, defined in IEEE 754-2008, is true for the absolute values of @var{x} @@ -1936,7 +2089,11 @@ perform these operations faster than the equivalent C code. @deftypefun double fmin (double @var{x}, double @var{y}) @deftypefunx float fminf (float @var{x}, float @var{y}) @deftypefunx {long double} fminl (long double @var{x}, long double @var{y}) +@deftypefunx _FloatN fminfN (_Float@var{N} @var{x}, _Float@var{N} @var{y}) +@deftypefunx _FloatNx fminfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}) @standards{ISO, math.h} +@standardsx{fminfN, TS 18661-3:2015, math.h} +@standardsx{fminfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{fmin} function returns the lesser of the two values @var{x} and @var{y}. It is similar to the expression @@ -1952,7 +2109,11 @@ are NaN, NaN is returned. @deftypefun double fmax (double @var{x}, double @var{y}) @deftypefunx float fmaxf (float @var{x}, float @var{y}) @deftypefunx {long double} fmaxl (long double @var{x}, long double @var{y}) +@deftypefunx _FloatN fmaxfN (_Float@var{N} @var{x}, _Float@var{N} @var{y}) +@deftypefunx _FloatNx fmaxfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}) @standards{ISO, math.h} +@standardsx{fmaxfN, TS 18661-3:2015, math.h} +@standardsx{fmaxfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{fmax} function returns the greater of the two values @var{x} and @var{y}. @@ -1964,18 +2125,26 @@ are NaN, NaN is returned. @deftypefun double fminmag (double @var{x}, double @var{y}) @deftypefunx float fminmagf (float @var{x}, float @var{y}) @deftypefunx {long double} fminmagl (long double @var{x}, long double @var{y}) +@deftypefunx _FloatN fminmagfN (_Float@var{N} @var{x}, _Float@var{N} @var{y}) +@deftypefunx _FloatNx fminmagfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}) @standards{ISO, math.h} +@standardsx{fminmagfN, TS 18661-3:2015, math.h} +@standardsx{fminmagfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} -These functions, from TS 18661-1:2014, return whichever of the two -values @var{x} and @var{y} has the smaller absolute value. If both -have the same absolute value, or either is NaN, they behave the same -as the @code{fmin} functions. +These functions, from TS 18661-1:2014 and TS 18661-3:2015, return +whichever of the two values @var{x} and @var{y} has the smaller absolute +value. If both have the same absolute value, or either is NaN, they +behave the same as the @code{fmin} functions. @end deftypefun @deftypefun double fmaxmag (double @var{x}, double @var{y}) @deftypefunx float fmaxmagf (float @var{x}, float @var{y}) @deftypefunx {long double} fmaxmagl (long double @var{x}, long double @var{y}) +@deftypefunx _FloatN fmaxmagfN (_Float@var{N} @var{x}, _Float@var{N} @var{y}) +@deftypefunx _FloatNx fmaxmagfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}) @standards{ISO, math.h} +@standardsx{fmaxmagfN, TS 18661-3:2015, math.h} +@standardsx{fmaxmagfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions, from TS 18661-1:2014, return whichever of the two values @var{x} and @var{y} has the greater absolute value. If both @@ -1986,7 +2155,11 @@ as the @code{fmax} functions. @deftypefun double fdim (double @var{x}, double @var{y}) @deftypefunx float fdimf (float @var{x}, float @var{y}) @deftypefunx {long double} fdiml (long double @var{x}, long double @var{y}) +@deftypefunx _FloatN fdimfN (_Float@var{N} @var{x}, _Float@var{N} @var{y}) +@deftypefunx _FloatNx fdimfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}) @standards{ISO, math.h} +@standardsx{fdimfN, TS 18661-3:2015, math.h} +@standardsx{fdimfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{fdim} function returns the positive difference between @var{x} and @var{y}. The positive difference is @math{@var{x} - @@ -1998,7 +2171,11 @@ If @var{x}, @var{y}, or both are NaN, NaN is returned. @deftypefun double fma (double @var{x}, double @var{y}, double @var{z}) @deftypefunx float fmaf (float @var{x}, float @var{y}, float @var{z}) @deftypefunx {long double} fmal (long double @var{x}, long double @var{y}, long double @var{z}) +@deftypefunx _FloatN fmafN (_Float@var{N} @var{x}, _Float@var{N} @var{y}, _Float@var{N} @var{z}) +@deftypefunx _FloatNx fmafNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}, _Float@var{N}x @var{z}) @standards{ISO, math.h} +@standardsx{fmafN, TS 18661-3:2015, math.h} +@standardsx{fmafNx, TS 18661-3:2015, math.h} @cindex butterfly @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{fma} function performs floating-point multiply-add. This is @@ -2033,6 +2210,11 @@ if @file{complex.h} has been included. There are three complex types, corresponding to the three real types: @code{float complex}, @code{double complex}, and @code{long double complex}. +Likewise, on machines that have support for @code{_Float@var{N}} or +@code{_Float@var{N}x} enabled, the complex types @code{_Float@var{N} +complex} and @code{_Float@var{N}x complex} are also available if +@file{complex.h} has been included; @pxref{Mathematics}. + To construct complex numbers you need a way to indicate the imaginary part of a number. There is no standard notation for an imaginary floating point constant. Instead, @file{complex.h} defines two macros @@ -2126,7 +2308,11 @@ available in three variants, one for each of the three complex types. @deftypefun double creal (complex double @var{z}) @deftypefunx float crealf (complex float @var{z}) @deftypefunx {long double} creall (complex long double @var{z}) +@deftypefunx _FloatN crealfN (complex _Float@var{N} @var{z}) +@deftypefunx _FloatNx crealfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{crealfN, TS 18661-3:2015, complex.h} +@standardsx{crealfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the real part of the complex number @var{z}. @end deftypefun @@ -2134,7 +2320,11 @@ These functions return the real part of the complex number @var{z}. @deftypefun double cimag (complex double @var{z}) @deftypefunx float cimagf (complex float @var{z}) @deftypefunx {long double} cimagl (complex long double @var{z}) +@deftypefunx _FloatN cimagfN (complex _Float@var{N} @var{z}) +@deftypefunx _FloatNx cimagfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{cimagfN, TS 18661-3:2015, complex.h} +@standardsx{cimagfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the imaginary part of the complex number @var{z}. @end deftypefun @@ -2142,7 +2332,11 @@ These functions return the imaginary part of the complex number @var{z}. @deftypefun {complex double} conj (complex double @var{z}) @deftypefunx {complex float} conjf (complex float @var{z}) @deftypefunx {complex long double} conjl (complex long double @var{z}) +@deftypefunx {complex _FloatN} conjfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} conjfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{conjfN, TS 18661-3:2015, complex.h} +@standardsx{conjfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the conjugate value of the complex number @var{z}. The conjugate of a complex number has the same real part and a @@ -2152,7 +2346,11 @@ negated imaginary part. In other words, @samp{conj(a + bi) = a + -bi}. @deftypefun double carg (complex double @var{z}) @deftypefunx float cargf (complex float @var{z}) @deftypefunx {long double} cargl (complex long double @var{z}) +@deftypefunx _FloatN cargfN (complex _Float@var{N} @var{z}) +@deftypefunx _FloatNx cargfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{cargfN, TS 18661-3:2015, complex.h} +@standardsx{cargfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the argument of the complex number @var{z}. The argument of a complex number is the angle in the complex plane @@ -2166,7 +2364,11 @@ number. This angle is measured in the usual fashion and ranges from @deftypefun {complex double} cproj (complex double @var{z}) @deftypefunx {complex float} cprojf (complex float @var{z}) @deftypefunx {complex long double} cprojl (complex long double @var{z}) +@deftypefunx {complex _FloatN} cprojfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} cprojfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{cprojfN, TS 18661-3:2015, complex.h} +@standardsx{cprojfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the projection of the complex value @var{z} onto the Riemann sphere. Values with an infinite imaginary part are projected diff --git a/manual/math.texi b/manual/math.texi index 912e74009f..cad9e5e88b 100644 --- a/manual/math.texi +++ b/manual/math.texi @@ -59,7 +59,11 @@ On some machines, @theglibc{} also provides @code{_Float@var{N}} and are not machine-dependent. When such a type, such as @code{_Float128}, is supported by @theglibc{}, extra variants for most of the mathematical functions provided for @code{double}, @code{float}, and @code{long -double} are also provided for the supported type. +double} are also provided for the supported type. Throughout this +manual, the @code{_Float@var{N}} and @code{_Float@var{N}x} variants of +these functions are described along with the @code{double}, +@code{float}, and @code{long double} variants and they come from +@w{ISO/IEC TS 18661-3}, unless explicitly stated otherwise. Currently, support for @code{_Float@var{N}} or @code{_Float@var{N}x} types is not provided for any machine. @@ -128,6 +132,13 @@ also defines these constants with type @code{long double}. The names: @code{M_El}, @code{M_PIl}, and so forth. These are only available if @code{_GNU_SOURCE} is defined. +Likewise, @theglibc{} also defines these constants with the types +@code{_Float@var{N}} and @code{_Float@var{N}x} for the machines that +have support for such types enabled (@pxref{Mathematics}) and if +@code{_GNU_SOURCE} is defined. When available, the macros names are +appended with @samp{f@var{N}} or @samp{f@var{N}x}, such as @samp{f128} +for the type @code{_Float128}. + @vindex PI @emph{Note:} Some programs use a constant named @code{PI} which has the same value as @code{M_PI}. This constant is not standard; it may have @@ -162,7 +173,11 @@ You can also compute the value of pi with the expression @code{acos @deftypefun double sin (double @var{x}) @deftypefunx float sinf (float @var{x}) @deftypefunx {long double} sinl (long double @var{x}) +@deftypefunx _FloatN sinfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx sinfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{sinfN, TS 18661-3:2015, math.h} +@standardsx{sinfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the sine of @var{x}, where @var{x} is given in radians. The return value is in the range @code{-1} to @code{1}. @@ -171,7 +186,11 @@ radians. The return value is in the range @code{-1} to @code{1}. @deftypefun double cos (double @var{x}) @deftypefunx float cosf (float @var{x}) @deftypefunx {long double} cosl (long double @var{x}) +@deftypefunx _FloatN cosfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx cosfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{cosfN, TS 18661-3:2015, math.h} +@standardsx{cosfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the cosine of @var{x}, where @var{x} is given in radians. The return value is in the range @code{-1} to @code{1}. @@ -180,7 +199,11 @@ radians. The return value is in the range @code{-1} to @code{1}. @deftypefun double tan (double @var{x}) @deftypefunx float tanf (float @var{x}) @deftypefunx {long double} tanl (long double @var{x}) +@deftypefunx _FloatN tanfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx tanfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{tanfN, TS 18661-3:2015, math.h} +@standardsx{tanfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the tangent of @var{x}, where @var{x} is given in radians. @@ -198,6 +221,8 @@ function to do that. @deftypefun void sincos (double @var{x}, double *@var{sinx}, double *@var{cosx}) @deftypefunx void sincosf (float @var{x}, float *@var{sinx}, float *@var{cosx}) @deftypefunx void sincosl (long double @var{x}, long double *@var{sinx}, long double *@var{cosx}) +@deftypefunx _FloatN sincosfN (_Float@var{N} @var{x}, _Float@var{N} *@var{sinx}, _Float@var{N} *@var{cosx}) +@deftypefunx _FloatNx sincosfNx (_Float@var{N}x @var{x}, _Float@var{N}x *@var{sinx}, _Float@var{N}x *@var{cosx}) @standards{GNU, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the sine of @var{x} in @code{*@var{sinx}} and the @@ -205,8 +230,9 @@ cosine of @var{x} in @code{*@var{cosx}}, where @var{x} is given in radians. Both values, @code{*@var{sinx}} and @code{*@var{cosx}}, are in the range of @code{-1} to @code{1}. -This function is a GNU extension. Portable programs should be prepared -to cope with its absence. +All these functions, including the @code{_Float@var{N}} and +@code{_Float@var{N}x} variants, are GNU extensions. Portable programs +should be prepared to cope with its absence. @end deftypefun @cindex complex trigonometric functions @@ -222,7 +248,11 @@ the implementation.) @deftypefun {complex double} csin (complex double @var{z}) @deftypefunx {complex float} csinf (complex float @var{z}) @deftypefunx {complex long double} csinl (complex long double @var{z}) +@deftypefunx {complex _FloatN} csinfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} csinfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{csinfN, TS 18661-3:2015, complex.h} +@standardsx{csinfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c There are calls to nan* that could trigger @mtslocale if they didn't get @c empty strings. @@ -240,7 +270,11 @@ $$\sin(z) = {1\over 2i} (e^{zi} - e^{-zi})$$ @deftypefun {complex double} ccos (complex double @var{z}) @deftypefunx {complex float} ccosf (complex float @var{z}) @deftypefunx {complex long double} ccosl (complex long double @var{z}) +@deftypefunx {complex _FloatN} ccosfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} ccosfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{ccosfN, TS 18661-3:2015, complex.h} +@standardsx{ccosfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the complex cosine of @var{z}. The mathematical definition of the complex cosine is @@ -256,7 +290,11 @@ $$\cos(z) = {1\over 2} (e^{zi} + e^{-zi})$$ @deftypefun {complex double} ctan (complex double @var{z}) @deftypefunx {complex float} ctanf (complex float @var{z}) @deftypefunx {complex long double} ctanl (complex long double @var{z}) +@deftypefunx {complex _FloatN} ctanfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} ctanfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{ctanfN, TS 18661-3:2015, complex.h} +@standardsx{ctanfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the complex tangent of @var{z}. The mathematical definition of the complex tangent is @@ -286,7 +324,11 @@ respectively. @deftypefun double asin (double @var{x}) @deftypefunx float asinf (float @var{x}) @deftypefunx {long double} asinl (long double @var{x}) +@deftypefunx _FloatN asinfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx asinfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{asinfN, TS 18661-3:2015, math.h} +@standardsx{asinfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions compute the arcsine of @var{x}---that is, the value whose sine is @var{x}. The value is in units of radians. Mathematically, @@ -301,7 +343,11 @@ domain, @code{asin} signals a domain error. @deftypefun double acos (double @var{x}) @deftypefunx float acosf (float @var{x}) @deftypefunx {long double} acosl (long double @var{x}) +@deftypefunx _FloatN acosfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx acosfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{acosfN, TS 18661-3:2015, math.h} +@standardsx{acosfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions compute the arccosine of @var{x}---that is, the value whose cosine is @var{x}. The value is in units of radians. @@ -316,7 +362,11 @@ domain, @code{acos} signals a domain error. @deftypefun double atan (double @var{x}) @deftypefunx float atanf (float @var{x}) @deftypefunx {long double} atanl (long double @var{x}) +@deftypefunx _FloatN atanfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx atanfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{atanfN, TS 18661-3:2015, math.h} +@standardsx{atanfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions compute the arctangent of @var{x}---that is, the value whose tangent is @var{x}. The value is in units of radians. @@ -327,7 +377,11 @@ returned is the one between @code{-pi/2} and @code{pi/2} (inclusive). @deftypefun double atan2 (double @var{y}, double @var{x}) @deftypefunx float atan2f (float @var{y}, float @var{x}) @deftypefunx {long double} atan2l (long double @var{y}, long double @var{x}) +@deftypefunx _FloatN atan2fN (_Float@var{N} @var{y}, _Float@var{N} @var{x}) +@deftypefunx _FloatNx atan2fNx (_Float@var{N}x @var{y}, _Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{atan2fN, TS 18661-3:2015, math.h} +@standardsx{atan2fNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} This function computes the arctangent of @var{y}/@var{x}, but the signs of both arguments are used to determine the quadrant of the result, and @@ -351,7 +405,11 @@ If both @var{x} and @var{y} are zero, @code{atan2} returns zero. @deftypefun {complex double} casin (complex double @var{z}) @deftypefunx {complex float} casinf (complex float @var{z}) @deftypefunx {complex long double} casinl (complex long double @var{z}) +@deftypefunx {complex _FloatN} casinfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} casinfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{casinfN, TS 18661-3:2015, complex.h} +@standardsx{casinfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions compute the complex arcsine of @var{z}---that is, the value whose sine is @var{z}. The value returned is in radians. @@ -363,7 +421,11 @@ values of @var{z}. @deftypefun {complex double} cacos (complex double @var{z}) @deftypefunx {complex float} cacosf (complex float @var{z}) @deftypefunx {complex long double} cacosl (complex long double @var{z}) +@deftypefunx {complex _FloatN} cacosfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} cacosfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{cacosfN, TS 18661-3:2015, complex.h} +@standardsx{cacosfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions compute the complex arccosine of @var{z}---that is, the value whose cosine is @var{z}. The value returned is in radians. @@ -376,7 +438,11 @@ values of @var{z}. @deftypefun {complex double} catan (complex double @var{z}) @deftypefunx {complex float} catanf (complex float @var{z}) @deftypefunx {complex long double} catanl (complex long double @var{z}) +@deftypefunx {complex _FloatN} catanfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} catanfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{catanfN, TS 18661-3:2015, complex.h} +@standardsx{catanfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions compute the complex arctangent of @var{z}---that is, the value whose tangent is @var{z}. The value is in units of radians. @@ -392,7 +458,11 @@ the value whose tangent is @var{z}. The value is in units of radians. @deftypefun double exp (double @var{x}) @deftypefunx float expf (float @var{x}) @deftypefunx {long double} expl (long double @var{x}) +@deftypefunx _FloatN expfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx expfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{expfN, TS 18661-3:2015, math.h} +@standardsx{expfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions compute @code{e} (the base of natural logarithms) raised to the power @var{x}. @@ -404,7 +474,11 @@ If the magnitude of the result is too large to be representable, @deftypefun double exp2 (double @var{x}) @deftypefunx float exp2f (float @var{x}) @deftypefunx {long double} exp2l (long double @var{x}) +@deftypefunx _FloatN exp2fN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx exp2fNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{exp2fN, TS 18661-3:2015, math.h} +@standardsx{exp2fNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions compute @code{2} raised to the power @var{x}. Mathematically, @code{exp2 (x)} is the same as @code{exp (x * log (2))}. @@ -413,10 +487,14 @@ Mathematically, @code{exp2 (x)} is the same as @code{exp (x * log (2))}. @deftypefun double exp10 (double @var{x}) @deftypefunx float exp10f (float @var{x}) @deftypefunx {long double} exp10l (long double @var{x}) +@deftypefunx _FloatN exp10fN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx exp10fNx (_Float@var{N}x @var{x}) @deftypefunx double pow10 (double @var{x}) @deftypefunx float pow10f (float @var{x}) @deftypefunx {long double} pow10l (long double @var{x}) @standards{ISO, math.h} +@standardsx{exp10fN, TS 18661-4:2015, math.h} +@standardsx{exp10fNx, TS 18661-4:2015, math.h} @standardsx{pow10, GNU, math.h} @standardsx{pow10f, GNU, math.h} @standardsx{pow10l, GNU, math.h} @@ -433,7 +511,11 @@ preferred, since it is analogous to @code{exp} and @code{exp2}. @deftypefun double log (double @var{x}) @deftypefunx float logf (float @var{x}) @deftypefunx {long double} logl (long double @var{x}) +@deftypefunx _FloatN logfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx logfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{logfN, TS 18661-3:2015, math.h} +@standardsx{logfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions compute the natural logarithm of @var{x}. @code{exp (log (@var{x}))} equals @var{x}, exactly in mathematics and approximately in @@ -447,7 +529,11 @@ it may signal overflow. @deftypefun double log10 (double @var{x}) @deftypefunx float log10f (float @var{x}) @deftypefunx {long double} log10l (long double @var{x}) +@deftypefunx _FloatN log10fN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx log10fNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{log10fN, TS 18661-3:2015, math.h} +@standardsx{log10fNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the base-10 logarithm of @var{x}. @code{log10 (@var{x})} equals @code{log (@var{x}) / log (10)}. @@ -457,7 +543,11 @@ These functions return the base-10 logarithm of @var{x}. @deftypefun double log2 (double @var{x}) @deftypefunx float log2f (float @var{x}) @deftypefunx {long double} log2l (long double @var{x}) +@deftypefunx _FloatN log2fN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx log2fNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{log2fN, TS 18661-3:2015, math.h} +@standardsx{log2fNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the base-2 logarithm of @var{x}. @code{log2 (@var{x})} equals @code{log (@var{x}) / log (2)}. @@ -466,7 +556,11 @@ These functions return the base-2 logarithm of @var{x}. @deftypefun double logb (double @var{x}) @deftypefunx float logbf (float @var{x}) @deftypefunx {long double} logbl (long double @var{x}) +@deftypefunx _FloatN logbfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx logbfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{logbfN, TS 18661-3:2015, math.h} +@standardsx{logbfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions extract the exponent of @var{x} and return it as a floating-point value. If @code{FLT_RADIX} is two, @code{logb} is equal @@ -481,15 +575,25 @@ negative), @code{logb} returns @math{@infinity{}}. If @var{x} is zero, @deftypefun int ilogb (double @var{x}) @deftypefunx int ilogbf (float @var{x}) @deftypefunx int ilogbl (long double @var{x}) +@deftypefunx int ilogbfN (_Float@var{N} @var{x}) +@deftypefunx int ilogbfNx (_Float@var{N}x @var{x}) @deftypefunx {long int} llogb (double @var{x}) @deftypefunx {long int} llogbf (float @var{x}) @deftypefunx {long int} llogbl (long double @var{x}) +@deftypefunx {long int} llogbfN (_Float@var{N} @var{x}) +@deftypefunx {long int} llogbfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{ilogbfN, TS 18661-3:2015, math.h} +@standardsx{ilogbfNx, TS 18661-3:2015, math.h} +@standardsx{llogbfN, TS 18661-3:2015, math.h} +@standardsx{llogbfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions are equivalent to the corresponding @code{logb} functions except that they return signed integer values. The -@code{ilogb} functions are from ISO C99; the @code{llogb} functions -are from TS 18661-1:2014. +@code{ilogb}, @code{ilogbf}, and @code{ilogbl} functions are from ISO +C99; the @code{llogb}, @code{llogbf}, @code{llogbl} functions are from +TS 18661-1:2014; the @code{ilogbfN}, @code{ilogbfNx}, @code{llogbfN}, +and @code{llogbfNx} functions are from TS 18661-3:2015. @end deftypefun @noindent @@ -555,7 +659,11 @@ if (i == FP_ILOGB0 || i == FP_ILOGBNAN) @deftypefun double pow (double @var{base}, double @var{power}) @deftypefunx float powf (float @var{base}, float @var{power}) @deftypefunx {long double} powl (long double @var{base}, long double @var{power}) +@deftypefunx _FloatN powfN (_Float@var{N} @var{base}, _Float@var{N} @var{power}) +@deftypefunx _FloatNx powfNx (_Float@var{N}x @var{base}, _Float@var{N}x @var{power}) @standards{ISO, math.h} +@standardsx{powfN, TS 18661-3:2015, math.h} +@standardsx{powfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These are general exponentiation functions, returning @var{base} raised to @var{power}. @@ -570,7 +678,11 @@ underflow or overflow the destination type. @deftypefun double sqrt (double @var{x}) @deftypefunx float sqrtf (float @var{x}) @deftypefunx {long double} sqrtl (long double @var{x}) +@deftypefunx _FloatN sqrtfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx sqrtfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{sqrtfN, TS 18661-3:2015, math.h} +@standardsx{sqrtfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the nonnegative square root of @var{x}. @@ -582,7 +694,11 @@ Mathematically, it should return a complex number. @deftypefun double cbrt (double @var{x}) @deftypefunx float cbrtf (float @var{x}) @deftypefunx {long double} cbrtl (long double @var{x}) +@deftypefunx _FloatN cbrtfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx cbrtfNx (_Float@var{N}x @var{x}) @standards{BSD, math.h} +@standardsx{cbrtfN, TS 18661-3:2015, math.h} +@standardsx{cbrtfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the cube root of @var{x}. They cannot fail; every representable real value has a representable real cube root. @@ -591,7 +707,11 @@ fail; every representable real value has a representable real cube root. @deftypefun double hypot (double @var{x}, double @var{y}) @deftypefunx float hypotf (float @var{x}, float @var{y}) @deftypefunx {long double} hypotl (long double @var{x}, long double @var{y}) +@deftypefunx _FloatN hypotfN (_Float@var{N} @var{x}, _Float@var{N} @var{y}) +@deftypefunx _FloatNx hypotfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y}) @standards{ISO, math.h} +@standardsx{hypotfN, TS 18661-3:2015, math.h} +@standardsx{hypotfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return @code{sqrt (@var{x}*@var{x} + @var{y}*@var{y})}. This is the length of the hypotenuse of a right @@ -604,7 +724,11 @@ much smaller. See also the function @code{cabs} in @ref{Absolute Value}. @deftypefun double expm1 (double @var{x}) @deftypefunx float expm1f (float @var{x}) @deftypefunx {long double} expm1l (long double @var{x}) +@deftypefunx _FloatN expm1fN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx expm1fNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{expm1fN, TS 18661-3:2015, math.h} +@standardsx{expm1fNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return a value equivalent to @code{exp (@var{x}) - 1}. They are computed in a way that is accurate even if @var{x} is @@ -615,7 +739,11 @@ to subtraction of two numbers that are nearly equal. @deftypefun double log1p (double @var{x}) @deftypefunx float log1pf (float @var{x}) @deftypefunx {long double} log1pl (long double @var{x}) +@deftypefunx _FloatN log1pfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx log1pfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{log1pfN, TS 18661-3:2015, math.h} +@standardsx{log1pfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return a value equivalent to @w{@code{log (1 + @var{x})}}. They are computed in a way that is accurate even if @var{x} is @@ -631,7 +759,11 @@ logarithm functions. @deftypefun {complex double} cexp (complex double @var{z}) @deftypefunx {complex float} cexpf (complex float @var{z}) @deftypefunx {complex long double} cexpl (complex long double @var{z}) +@deftypefunx {complex _FloatN} cexpfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} cexpfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{cexpfN, TS 18661-3:2015, complex.h} +@standardsx{cexpfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return @code{e} (the base of natural logarithms) raised to the power of @var{z}. @@ -648,7 +780,11 @@ $$\exp(z) = e^z = e^{{\rm Re}\,z} (\cos ({\rm Im}\,z) + i \sin ({\rm Im}\,z))$$ @deftypefun {complex double} clog (complex double @var{z}) @deftypefunx {complex float} clogf (complex float @var{z}) @deftypefunx {complex long double} clogl (complex long double @var{z}) +@deftypefunx {complex _FloatN} clogfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} clogfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{clogfN, TS 18661-3:2015, complex.h} +@standardsx{clogfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the natural logarithm of @var{z}. Mathematically, this corresponds to the value @@ -670,6 +806,8 @@ or is very close to 0. It is well-defined for all other values of @deftypefun {complex double} clog10 (complex double @var{z}) @deftypefunx {complex float} clog10f (complex float @var{z}) @deftypefunx {complex long double} clog10l (complex long double @var{z}) +@deftypefunx {complex _FloatN} clog10fN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} clog10fNx (complex _Float@var{N}x @var{z}) @standards{GNU, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the base 10 logarithm of the complex value @@ -682,13 +820,18 @@ These functions return the base 10 logarithm of the complex value $$\log_{10}(z) = \log_{10}|z| + i \arg z / \log (10)$$ @end tex -These functions are GNU extensions. +All these functions, including the @code{_Float@var{N}} and +@code{_Float@var{N}x} variants, are GNU extensions. @end deftypefun @deftypefun {complex double} csqrt (complex double @var{z}) @deftypefunx {complex float} csqrtf (complex float @var{z}) @deftypefunx {complex long double} csqrtl (complex long double @var{z}) +@deftypefunx {complex _FloatN} csqrtfN (_Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} csqrtfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{csqrtfN, TS 18661-3:2015, complex.h} +@standardsx{csqrtfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the complex square root of the argument @var{z}. Unlike the real-valued functions, they are defined for all values of @var{z}. @@ -697,7 +840,11 @@ the real-valued functions, they are defined for all values of @var{z}. @deftypefun {complex double} cpow (complex double @var{base}, complex double @var{power}) @deftypefunx {complex float} cpowf (complex float @var{base}, complex float @var{power}) @deftypefunx {complex long double} cpowl (complex long double @var{base}, complex long double @var{power}) +@deftypefunx {complex _FloatN} cpowfN (complex _Float@var{N} @var{base}, complex _Float@var{N} @var{power}) +@deftypefunx {complex _FloatNx} cpowfNx (complex _Float@var{N}x @var{base}, complex _Float@var{N}x @var{power}) @standards{ISO, complex.h} +@standardsx{cpowfN, TS 18661-3:2015, complex.h} +@standardsx{cpowfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return @var{base} raised to the power of @var{power}. This is equivalent to @w{@code{cexp (y * clog (x))}} @@ -713,7 +860,11 @@ see @ref{Exponents and Logarithms}. @deftypefun double sinh (double @var{x}) @deftypefunx float sinhf (float @var{x}) @deftypefunx {long double} sinhl (long double @var{x}) +@deftypefunx _FloatN sinhfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx sinhfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{sinhfN, TS 18661-3:2015, math.h} +@standardsx{sinhfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the hyperbolic sine of @var{x}, defined mathematically as @w{@code{(exp (@var{x}) - exp (-@var{x})) / 2}}. They @@ -723,7 +874,11 @@ may signal overflow if @var{x} is too large. @deftypefun double cosh (double @var{x}) @deftypefunx float coshf (float @var{x}) @deftypefunx {long double} coshl (long double @var{x}) +@deftypefunx _FloatN coshfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx coshfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{coshfN, TS 18661-3:2015, math.h} +@standardsx{coshfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the hyperbolic cosine of @var{x}, defined mathematically as @w{@code{(exp (@var{x}) + exp (-@var{x})) / 2}}. @@ -733,7 +888,11 @@ They may signal overflow if @var{x} is too large. @deftypefun double tanh (double @var{x}) @deftypefunx float tanhf (float @var{x}) @deftypefunx {long double} tanhl (long double @var{x}) +@deftypefunx _FloatN tanhfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx tanhfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{tanhfN, TS 18661-3:2015, math.h} +@standardsx{tanhfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the hyperbolic tangent of @var{x}, defined mathematically as @w{@code{sinh (@var{x}) / cosh (@var{x})}}. @@ -748,7 +907,11 @@ complex arguments. @deftypefun {complex double} csinh (complex double @var{z}) @deftypefunx {complex float} csinhf (complex float @var{z}) @deftypefunx {complex long double} csinhl (complex long double @var{z}) +@deftypefunx {complex _FloatN} csinhfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} csinhfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{csinhfN, TS 18661-3:2015, complex.h} +@standardsx{csinhfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the complex hyperbolic sine of @var{z}, defined mathematically as @w{@code{(exp (@var{z}) - exp (-@var{z})) / 2}}. @@ -757,7 +920,11 @@ mathematically as @w{@code{(exp (@var{z}) - exp (-@var{z})) / 2}}. @deftypefun {complex double} ccosh (complex double @var{z}) @deftypefunx {complex float} ccoshf (complex float @var{z}) @deftypefunx {complex long double} ccoshl (complex long double @var{z}) +@deftypefunx {complex _FloatN} ccoshfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} ccoshfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{ccoshfN, TS 18661-3:2015, complex.h} +@standardsx{ccoshfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the complex hyperbolic cosine of @var{z}, defined mathematically as @w{@code{(exp (@var{z}) + exp (-@var{z})) / 2}}. @@ -766,7 +933,11 @@ mathematically as @w{@code{(exp (@var{z}) + exp (-@var{z})) / 2}}. @deftypefun {complex double} ctanh (complex double @var{z}) @deftypefunx {complex float} ctanhf (complex float @var{z}) @deftypefunx {complex long double} ctanhl (complex long double @var{z}) +@deftypefunx {complex _FloatN} ctanhfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} ctanhfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{ctanhfN, TS 18661-3:2015, complex.h} +@standardsx{ctanhfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the complex hyperbolic tangent of @var{z}, defined mathematically as @w{@code{csinh (@var{z}) / ccosh (@var{z})}}. @@ -778,7 +949,11 @@ defined mathematically as @w{@code{csinh (@var{z}) / ccosh (@var{z})}}. @deftypefun double asinh (double @var{x}) @deftypefunx float asinhf (float @var{x}) @deftypefunx {long double} asinhl (long double @var{x}) +@deftypefunx _FloatN asinhfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx asinhfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{asinhfN, TS 18661-3:2015, math.h} +@standardsx{asinhfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the inverse hyperbolic sine of @var{x}---the value whose hyperbolic sine is @var{x}. @@ -787,7 +962,11 @@ value whose hyperbolic sine is @var{x}. @deftypefun double acosh (double @var{x}) @deftypefunx float acoshf (float @var{x}) @deftypefunx {long double} acoshl (long double @var{x}) +@deftypefunx _FloatN acoshfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx acoshfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{acoshfN, TS 18661-3:2015, math.h} +@standardsx{acoshfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the inverse hyperbolic cosine of @var{x}---the value whose hyperbolic cosine is @var{x}. If @var{x} is less than @@ -797,7 +976,11 @@ value whose hyperbolic cosine is @var{x}. If @var{x} is less than @deftypefun double atanh (double @var{x}) @deftypefunx float atanhf (float @var{x}) @deftypefunx {long double} atanhl (long double @var{x}) +@deftypefunx _FloatN atanhfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx atanhfNx (_Float@var{N}x @var{x}) @standards{ISO, math.h} +@standardsx{atanhfN, TS 18661-3:2015, math.h} +@standardsx{atanhfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the inverse hyperbolic tangent of @var{x}---the value whose hyperbolic tangent is @var{x}. If the absolute value of @@ -810,7 +993,11 @@ if it is equal to 1, @code{atanh} returns infinity. @deftypefun {complex double} casinh (complex double @var{z}) @deftypefunx {complex float} casinhf (complex float @var{z}) @deftypefunx {complex long double} casinhl (complex long double @var{z}) +@deftypefunx {complex _FloatN} casinhfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} casinhfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{casinhfN, TS 18661-3:2015, complex.h} +@standardsx{casinhfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the inverse complex hyperbolic sine of @var{z}---the value whose complex hyperbolic sine is @var{z}. @@ -819,7 +1006,11 @@ These functions return the inverse complex hyperbolic sine of @deftypefun {complex double} cacosh (complex double @var{z}) @deftypefunx {complex float} cacoshf (complex float @var{z}) @deftypefunx {complex long double} cacoshl (complex long double @var{z}) +@deftypefunx {complex _FloatN} cacoshfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} cacoshfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{cacoshfN, TS 18661-3:2015, complex.h} +@standardsx{cacoshfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the inverse complex hyperbolic cosine of @var{z}---the value whose complex hyperbolic cosine is @var{z}. Unlike @@ -829,7 +1020,11 @@ the real-valued functions, there are no restrictions on the value of @var{z}. @deftypefun {complex double} catanh (complex double @var{z}) @deftypefunx {complex float} catanhf (complex float @var{z}) @deftypefunx {complex long double} catanhl (complex long double @var{z}) +@deftypefunx {complex _FloatN} catanhfN (complex _Float@var{N} @var{z}) +@deftypefunx {complex _FloatNx} catanhfNx (complex _Float@var{N}x @var{z}) @standards{ISO, complex.h} +@standardsx{catanhfN, TS 18661-3:2015, complex.h} +@standardsx{catanhfNx, TS 18661-3:2015, complex.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the inverse complex hyperbolic tangent of @var{z}---the value whose complex hyperbolic tangent is @var{z}. Unlike @@ -849,7 +1044,11 @@ useful. Currently they only have real-valued versions. @deftypefun double erf (double @var{x}) @deftypefunx float erff (float @var{x}) @deftypefunx {long double} erfl (long double @var{x}) +@deftypefunx _FloatN erffN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx erffNx (_Float@var{N}x @var{x}) @standards{SVID, math.h} +@standardsx{erffN, TS 18661-3:2015, math.h} +@standardsx{erffNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{erf} returns the error function of @var{x}. The error function is defined as @@ -866,7 +1065,11 @@ erf (x) = 2/sqrt(pi) * integral from 0 to x of exp(-t^2) dt @deftypefun double erfc (double @var{x}) @deftypefunx float erfcf (float @var{x}) @deftypefunx {long double} erfcl (long double @var{x}) +@deftypefunx _FloatN erfcfN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx erfcfNx (_Float@var{N}x @var{x}) @standards{SVID, math.h} +@standardsx{erfcfN, TS 18661-3:2015, math.h} +@standardsx{erfcfNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{erfc} returns @code{1.0 - erf(@var{x})}, but computed in a fashion that avoids round-off error when @var{x} is large. @@ -875,7 +1078,11 @@ fashion that avoids round-off error when @var{x} is large. @deftypefun double lgamma (double @var{x}) @deftypefunx float lgammaf (float @var{x}) @deftypefunx {long double} lgammal (long double @var{x}) +@deftypefunx _FloatN lgammafN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx lgammafNx (_Float@var{N}x @var{x}) @standards{SVID, math.h} +@standardsx{lgammafN, TS 18661-3:2015, math.h} +@standardsx{lgammafNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtunsafe{@mtasurace{:signgam}}@asunsafe{}@acsafe{}} @code{lgamma} returns the natural logarithm of the absolute value of the gamma function of @var{x}. The gamma function is defined as @@ -909,11 +1116,18 @@ singularity. @deftypefun double lgamma_r (double @var{x}, int *@var{signp}) @deftypefunx float lgammaf_r (float @var{x}, int *@var{signp}) @deftypefunx {long double} lgammal_r (long double @var{x}, int *@var{signp}) +@deftypefunx _FloatN lgammafN_r (_Float@var{N} @var{x}, int *@var{signp}) +@deftypefunx _FloatNx lgammafNx_r (_Float@var{N}x @var{x}, int *@var{signp}) @standards{XPG, math.h} +@standardsx{lgammafN_r, GNU, math.h} +@standardsx{lgammafNx_r, GNU, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{lgamma_r} is just like @code{lgamma}, but it stores the sign of the intermediate result in the variable pointed to by @var{signp} instead of in the @var{signgam} global. This means it is reentrant. + +The @code{lgammaf@var{N}_r} and @code{lgammaf@var{N}x_r} functions are +GNU extensions. @end deftypefun @deftypefun double gamma (double @var{x}) @@ -930,12 +1144,16 @@ standardized in @w{ISO C99} while @code{gamma} is not. @deftypefun double tgamma (double @var{x}) @deftypefunx float tgammaf (float @var{x}) @deftypefunx {long double} tgammal (long double @var{x}) +@deftypefunx _FloatN tgammafN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx tgammafNx (_Float@var{N}x @var{x}) @standardsx{tgamma, XPG, math.h} @standardsx{tgamma, ISO, math.h} @standardsx{tgammaf, XPG, math.h} @standardsx{tgammaf, ISO, math.h} @standardsx{tgammal, XPG, math.h} @standardsx{tgammal, ISO, math.h} +@standardsx{tgammafN, TS 18661-3:2015, math.h} +@standardsx{tgammafNx, TS 18661-3:2015, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{tgamma} applies the gamma function to @var{x}. The gamma function is defined as @@ -948,67 +1166,111 @@ gamma (x) = integral from 0 to @infinity{} of t^(x-1) e^-t dt @end smallexample @end ifnottex -This function was introduced in @w{ISO C99}. +This function was introduced in @w{ISO C99}. The @code{_Float@var{N}} +and @code{_Float@var{N}x} variants were introduced in @w{ISO/IEC TS +18661-3}. @end deftypefun @deftypefun double j0 (double @var{x}) @deftypefunx float j0f (float @var{x}) @deftypefunx {long double} j0l (long double @var{x}) +@deftypefunx _FloatN j0fN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx j0fNx (_Float@var{N}x @var{x}) @standards{SVID, math.h} +@standardsx{j0fN, GNU, math.h} +@standardsx{j0fNx, GNU, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{j0} returns the Bessel function of the first kind of order 0 of @var{x}. It may signal underflow if @var{x} is too large. + +The @code{_Float@var{N}} and @code{_Float@var{N}x} variants are GNU +extensions. @end deftypefun @deftypefun double j1 (double @var{x}) @deftypefunx float j1f (float @var{x}) @deftypefunx {long double} j1l (long double @var{x}) +@deftypefunx _FloatN j1fN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx j1fNx (_Float@var{N}x @var{x}) @standards{SVID, math.h} +@standardsx{j1fN, GNU, math.h} +@standardsx{j1fNx, GNU, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{j1} returns the Bessel function of the first kind of order 1 of @var{x}. It may signal underflow if @var{x} is too large. + +The @code{_Float@var{N}} and @code{_Float@var{N}x} variants are GNU +extensions. @end deftypefun @deftypefun double jn (int @var{n}, double @var{x}) @deftypefunx float jnf (int @var{n}, float @var{x}) @deftypefunx {long double} jnl (int @var{n}, long double @var{x}) +@deftypefunx _FloatN jnfN (int @var{n}, _Float@var{N} @var{x}) +@deftypefunx _FloatNx jnfNx (int @var{n}, _Float@var{N}x @var{x}) @standards{SVID, math.h} +@standardsx{jnfN, GNU, math.h} +@standardsx{jnfNx, GNU, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{jn} returns the Bessel function of the first kind of order @var{n} of @var{x}. It may signal underflow if @var{x} is too large. + +The @code{_Float@var{N}} and @code{_Float@var{N}x} variants are GNU +extensions. @end deftypefun @deftypefun double y0 (double @var{x}) @deftypefunx float y0f (float @var{x}) @deftypefunx {long double} y0l (long double @var{x}) +@deftypefunx _FloatN y0fN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx y0fNx (_Float@var{N}x @var{x}) @standards{SVID, math.h} +@standardsx{y0fN, GNU, math.h} +@standardsx{y0fNx, GNU, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{y0} returns the Bessel function of the second kind of order 0 of @var{x}. It may signal underflow if @var{x} is too large. If @var{x} is negative, @code{y0} signals a domain error; if it is zero, @code{y0} signals overflow and returns @math{-@infinity}. + +The @code{_Float@var{N}} and @code{_Float@var{N}x} variants are GNU +extensions. @end deftypefun @deftypefun double y1 (double @var{x}) @deftypefunx float y1f (float @var{x}) @deftypefunx {long double} y1l (long double @var{x}) +@deftypefunx _FloatN y1fN (_Float@var{N} @var{x}) +@deftypefunx _FloatNx y1fNx (_Float@var{N}x @var{x}) @standards{SVID, math.h} +@standardsx{y1fN, GNU, math.h} +@standardsx{y1fNx, GNU, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{y1} returns the Bessel function of the second kind of order 1 of @var{x}. It may signal underflow if @var{x} is too large. If @var{x} is negative, @code{y1} signals a domain error; if it is zero, @code{y1} signals overflow and returns @math{-@infinity}. + +The @code{_Float@var{N}} and @code{_Float@var{N}x} variants are GNU +extensions. @end deftypefun @deftypefun double yn (int @var{n}, double @var{x}) @deftypefunx float ynf (int @var{n}, float @var{x}) @deftypefunx {long double} ynl (int @var{n}, long double @var{x}) +@deftypefunx _FloatN ynfN (int @var{n}, _Float@var{N} @var{x}) +@deftypefunx _FloatNx ynfNx (int @var{n}, _Float@var{N}x @var{x}) @standards{SVID, math.h} +@standardsx{ynfN, GNU, math.h} +@standardsx{ynfNx, GNU, math.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{yn} returns the Bessel function of the second kind of order @var{n} of @var{x}. It may signal underflow if @var{x} is too large. If @var{x} is negative, @code{yn} signals a domain error; if it is zero, @code{yn} signals overflow and returns @math{-@infinity}. + +The @code{_Float@var{N}} and @code{_Float@var{N}x} variants are GNU +extensions. @end deftypefun @node Errors in Math Functions |