aboutsummaryrefslogtreecommitdiff
path: root/manual/math.texi
diff options
context:
space:
mode:
authorRical Jasan <ricaljasan@pacific.net>2017-06-15 21:12:39 -0700
committerRical Jasan <ricaljasan@pacific.net>2017-06-15 21:26:20 -0700
commitd08a7e4cbe43d5e4e4b14dea950fea623d96c1a1 (patch)
tree6f27987046ae0e8804f4d641c99ff1666652117a /manual/math.texi
parent27691d5cec9b896ea0792151a27c6d7d7a4065ea (diff)
downloadglibc-d08a7e4cbe43d5e4e4b14dea950fea623d96c1a1.zip
glibc-d08a7e4cbe43d5e4e4b14dea950fea623d96c1a1.tar.gz
glibc-d08a7e4cbe43d5e4e4b14dea950fea623d96c1a1.tar.bz2
manual: Replace summary.awk with summary.pl.
The Summary is now generated from @standards, and syntax-checking is performed. If invalid @standards syntax is detected, summary.pl will fail, reporting all errors. Failure and error reporting is disabled for now, however, since much of the manual is still incomplete wrt. header and standards annotations. Note that the sorting order of the Summary has changed; summary.pl respects the locale, like summary.awk did, but the use of LC_ALL=C is introduced in the Makefile. Other notable deviations are improved detection of the annotated elements' names, which are used for sorting, and improved detection of the @node used to reference into the manual. The most noticeable difference in the rendered Summary is that entries may now contain multiple lines, one for each header and standard combination. summary.pl accepts a `--help' option, which details the expected syntax of @standards. If errors are reported, the user is directed to this feature for further information. * manual/Makefile: Generate summary.texi with summary.pl. Force use of the C locale. Update Perl dependency comment. * manual/header.texi: Update reference to summary.awk. * manual/macros.texi: Refer authors to `summary.pl --help'. * manual/summary.awk: Remove file. * manual/summary.pl: New file. Generate summary.texi, and check for @standards-related syntax errors. * manual/argp.texi: Convert header and standards @comments to @standards. * manual/arith.texi: Likewise. * manual/charset.texi: Likewise. * manual/conf.texi: Likewise. * manual/creature.texi: Likewise. * manual/crypt.texi: Likewise. * manual/ctype.texi: Likewise. * manual/debug.texi: Likewise. * manual/errno.texi: Likewise. * manual/filesys.texi: Likewise. * manual/getopt.texi: Likewise. * manual/job.texi: Likewise. * manual/lang.texi: Likewise. * manual/llio.texi: Likewise. * manual/locale.texi: Likewise. * manual/math.texi: Likewise. * manual/memory.texi: Likewise. * manual/message.texi: Likewise. * manual/pattern.texi: Likewise. * manual/pipe.texi: Likewise. * manual/process.texi: Likewise. * manual/resource.texi: Likewise. * manual/search.texi: Likewise. * manual/setjmp.texi: Likewise. * manual/signal.texi: Likewise. * manual/socket.texi: Likewise. * manual/startup.texi: Likewise. * manual/stdio.texi: Likewise. * manual/string.texi: Likewise. * manual/sysinfo.texi: Likewise. * manual/syslog.texi: Likewise. * manual/terminal.texi: Likewise. * manual/threads.texi: Likewise. * manual/time.texi: Likewise. * manual/users.texi: Likewise.
Diffstat (limited to 'manual/math.texi')
-rw-r--r--manual/math.texi524
1 files changed, 100 insertions, 424 deletions
diff --git a/manual/math.texi b/manual/math.texi
index 53c2bc1..912e740 100644
--- a/manual/math.texi
+++ b/manual/math.texi
@@ -159,43 +159,28 @@ yourself:
You can also compute the value of pi with the expression @code{acos
(-1.0)}.
-@comment math.h
-@comment ISO
@deftypefun double sin (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float sinf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} sinl (long double @var{x})
+@standards{ISO, 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}.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double cos (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float cosf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} cosl (long double @var{x})
+@standards{ISO, 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}.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double tan (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float tanf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} tanl (long double @var{x})
+@standards{ISO, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return the tangent of @var{x}, where @var{x} is given in
radians.
@@ -210,15 +195,10 @@ and cosine of the same angle are needed at the same time. It is more
efficient to compute them simultaneously, so the library provides a
function to do that.
-@comment math.h
-@comment GNU
@deftypefun void sincos (double @var{x}, double *@var{sinx}, double *@var{cosx})
-@comment math.h
-@comment GNU
@deftypefunx void sincosf (float @var{x}, float *@var{sinx}, float *@var{cosx})
-@comment math.h
-@comment GNU
@deftypefunx void sincosl (long double @var{x}, long double *@var{sinx}, long double *@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
cosine of @var{x} in @code{*@var{cosx}}, where @var{x} is given in
@@ -239,15 +219,10 @@ by the standard.
(As of this writing GCC supports complex numbers, but there are bugs in
the implementation.)
-@comment complex.h
-@comment ISO
@deftypefun {complex double} csin (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} csinf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} csinl (complex long double @var{z})
+@standards{ISO, 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.
@@ -262,15 +237,10 @@ $$\sin(z) = {1\over 2i} (e^{zi} - e^{-zi})$$
@end tex
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} ccos (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} ccosf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} ccosl (complex long double @var{z})
+@standards{ISO, complex.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return the complex cosine of @var{z}.
The mathematical definition of the complex cosine is
@@ -283,15 +253,10 @@ $$\cos(z) = {1\over 2} (e^{zi} + e^{-zi})$$
@end tex
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} ctan (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} ctanf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} ctanl (complex long double @var{z})
+@standards{ISO, complex.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return the complex tangent of @var{z}.
The mathematical definition of the complex tangent is
@@ -318,15 +283,10 @@ These are the usual arcsine, arccosine and arctangent functions,
which are the inverses of the sine, cosine and tangent functions
respectively.
-@comment math.h
-@comment ISO
@deftypefun double asin (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float asinf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} asinl (long double @var{x})
+@standards{ISO, 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,
@@ -338,15 +298,10 @@ over the domain @code{-1} to @code{1}. If @var{x} is outside the
domain, @code{asin} signals a domain error.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double acos (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float acosf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} acosl (long double @var{x})
+@standards{ISO, 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.
@@ -358,15 +313,10 @@ over the domain @code{-1} to @code{1}. If @var{x} is outside the
domain, @code{acos} signals a domain error.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double atan (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float atanf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} atanl (long double @var{x})
+@standards{ISO, 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.
@@ -374,15 +324,10 @@ Mathematically, there are infinitely many such values; the one actually
returned is the one between @code{-pi/2} and @code{pi/2} (inclusive).
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double atan2 (double @var{y}, double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float atan2f (float @var{y}, float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} atan2l (long double @var{y}, long double @var{x})
+@standards{ISO, 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
@@ -403,15 +348,10 @@ If both @var{x} and @var{y} are zero, @code{atan2} returns zero.
@cindex inverse complex trigonometric functions
@w{ISO C99} defines complex versions of the inverse trig functions.
-@comment complex.h
-@comment ISO
@deftypefun {complex double} casin (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} casinf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} casinl (complex long double @var{z})
+@standards{ISO, 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.
@@ -420,15 +360,10 @@ Unlike the real-valued functions, @code{casin} is defined for all
values of @var{z}.
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} cacos (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} cacosf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} cacosl (complex long double @var{z})
+@standards{ISO, 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.
@@ -438,15 +373,10 @@ values of @var{z}.
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} catan (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} catanf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} catanl (complex long double @var{z})
+@standards{ISO, 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.
@@ -459,15 +389,10 @@ the value whose tangent is @var{z}. The value is in units of radians.
@cindex power functions
@cindex logarithm functions
-@comment math.h
-@comment ISO
@deftypefun double exp (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float expf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} expl (long double @var{x})
+@standards{ISO, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions compute @code{e} (the base of natural logarithms) raised
to the power @var{x}.
@@ -476,38 +401,25 @@ If the magnitude of the result is too large to be representable,
@code{exp} signals overflow.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double exp2 (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float exp2f (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} exp2l (long double @var{x})
+@standards{ISO, 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))}.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double exp10 (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float exp10f (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} exp10l (long double @var{x})
-@comment math.h
-@comment GNU
@deftypefunx double pow10 (double @var{x})
-@comment math.h
-@comment GNU
@deftypefunx float pow10f (float @var{x})
-@comment math.h
-@comment GNU
@deftypefunx {long double} pow10l (long double @var{x})
+@standards{ISO, math.h}
+@standardsx{pow10, GNU, math.h}
+@standardsx{pow10f, GNU, math.h}
+@standardsx{pow10l, GNU, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions compute @code{10} raised to the power @var{x}.
Mathematically, @code{exp10 (x)} is the same as @code{exp (x * log (10))}.
@@ -518,15 +430,10 @@ preferred, since it is analogous to @code{exp} and @code{exp2}.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double log (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float logf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} logl (long double @var{x})
+@standards{ISO, 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
@@ -537,44 +444,29 @@ is zero, it returns negative infinity; if @var{x} is too close to zero,
it may signal overflow.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double log10 (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float log10f (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} log10l (long double @var{x})
+@standards{ISO, 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)}.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double log2 (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float log2f (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} log2l (long double @var{x})
+@standards{ISO, 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)}.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double logb (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float logbf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} logbl (long double @var{x})
+@standards{ISO, 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
@@ -586,24 +478,13 @@ negative), @code{logb} returns @math{@infinity{}}. If @var{x} is zero,
@code{logb} returns @math{@infinity{}}. It does not signal.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun int ilogb (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx int ilogbf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx int ilogbl (long double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long int} llogb (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long int} llogbf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long int} llogbl (long double @var{x})
+@standards{ISO, 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
@@ -616,36 +497,32 @@ Since integers cannot represent infinity and NaN, @code{ilogb} instead
returns an integer that can't be the exponent of a normal floating-point
number. @file{math.h} defines constants so you can check for this.
-@comment math.h
-@comment ISO
@deftypevr Macro int FP_ILOGB0
+@standards{ISO, math.h}
@code{ilogb} returns this value if its argument is @code{0}. The
numeric value is either @code{INT_MIN} or @code{-INT_MAX}.
This macro is defined in @w{ISO C99}.
@end deftypevr
-@comment math.h
-@comment ISO
@deftypevr Macro {long int} FP_LLOGB0
+@standards{ISO, math.h}
@code{llogb} returns this value if its argument is @code{0}. The
numeric value is either @code{LONG_MIN} or @code{-LONG_MAX}.
This macro is defined in TS 18661-1:2014.
@end deftypevr
-@comment math.h
-@comment ISO
@deftypevr Macro int FP_ILOGBNAN
+@standards{ISO, math.h}
@code{ilogb} returns this value if its argument is @code{NaN}. The
numeric value is either @code{INT_MIN} or @code{INT_MAX}.
This macro is defined in @w{ISO C99}.
@end deftypevr
-@comment math.h
-@comment ISO
@deftypevr Macro {long int} FP_LLOGBNAN
+@standards{ISO, math.h}
@code{llogb} returns this value if its argument is @code{NaN}. The
numeric value is either @code{LONG_MIN} or @code{LONG_MAX}.
@@ -675,15 +552,10 @@ if (i == FP_ILOGB0 || i == FP_ILOGBNAN)
@}
@end smallexample
-@comment math.h
-@comment ISO
@deftypefun double pow (double @var{base}, double @var{power})
-@comment math.h
-@comment ISO
@deftypefunx float powf (float @var{base}, float @var{power})
-@comment math.h
-@comment ISO
@deftypefunx {long double} powl (long double @var{base}, long double @var{power})
+@standards{ISO, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These are general exponentiation functions, returning @var{base} raised
to @var{power}.
@@ -695,15 +567,10 @@ underflow or overflow the destination type.
@end deftypefun
@cindex square root function
-@comment math.h
-@comment ISO
@deftypefun double sqrt (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float sqrtf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} sqrtl (long double @var{x})
+@standards{ISO, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return the nonnegative square root of @var{x}.
@@ -712,29 +579,19 @@ Mathematically, it should return a complex number.
@end deftypefun
@cindex cube root function
-@comment math.h
-@comment BSD
@deftypefun double cbrt (double @var{x})
-@comment math.h
-@comment BSD
@deftypefunx float cbrtf (float @var{x})
-@comment math.h
-@comment BSD
@deftypefunx {long double} cbrtl (long double @var{x})
+@standards{BSD, 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.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double hypot (double @var{x}, double @var{y})
-@comment math.h
-@comment ISO
@deftypefunx float hypotf (float @var{x}, float @var{y})
-@comment math.h
-@comment ISO
@deftypefunx {long double} hypotl (long double @var{x}, long double @var{y})
+@standards{ISO, 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
@@ -744,15 +601,10 @@ instead of the direct formula is wise, since the error is
much smaller. See also the function @code{cabs} in @ref{Absolute Value}.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double expm1 (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float expm1f (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} expm1l (long double @var{x})
+@standards{ISO, 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
@@ -760,15 +612,10 @@ near zero---a case where @code{exp (@var{x}) - 1} would be inaccurate owing
to subtraction of two numbers that are nearly equal.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double log1p (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float log1pf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} log1pl (long double @var{x})
+@standards{ISO, 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
@@ -781,15 +628,10 @@ near zero.
@w{ISO C99} defines complex variants of some of the exponentiation and
logarithm functions.
-@comment complex.h
-@comment ISO
@deftypefun {complex double} cexp (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} cexpf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} cexpl (complex long double @var{z})
+@standards{ISO, complex.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return @code{e} (the base of natural
logarithms) raised to the power of @var{z}.
@@ -803,15 +645,10 @@ $$\exp(z) = e^z = e^{{\rm Re}\,z} (\cos ({\rm Im}\,z) + i \sin ({\rm Im}\,z))$$
@end tex
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} clog (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} clogf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} clogl (complex long double @var{z})
+@standards{ISO, complex.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return the natural logarithm of @var{z}.
Mathematically, this corresponds to the value
@@ -830,15 +667,10 @@ or is very close to 0. It is well-defined for all other values of
@end deftypefun
-@comment complex.h
-@comment GNU
@deftypefun {complex double} clog10 (complex double @var{z})
-@comment complex.h
-@comment GNU
@deftypefunx {complex float} clog10f (complex float @var{z})
-@comment complex.h
-@comment GNU
@deftypefunx {complex long double} clog10l (complex long double @var{z})
+@standards{GNU, complex.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return the base 10 logarithm of the complex value
@var{z}. Mathematically, this corresponds to the value
@@ -853,29 +685,19 @@ $$\log_{10}(z) = \log_{10}|z| + i \arg z / \log (10)$$
These functions are GNU extensions.
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} csqrt (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} csqrtf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} csqrtl (complex long double @var{z})
+@standards{ISO, 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}.
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} cpow (complex double @var{base}, complex double @var{power})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} cpowf (complex float @var{base}, complex float @var{power})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} cpowl (complex long double @var{base}, complex long double @var{power})
+@standards{ISO, 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))}}
@@ -888,45 +710,30 @@ These functions return @var{base} raised to the power of
The functions in this section are related to the exponential functions;
see @ref{Exponents and Logarithms}.
-@comment math.h
-@comment ISO
@deftypefun double sinh (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float sinhf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} sinhl (long double @var{x})
+@standards{ISO, 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
may signal overflow if @var{x} is too large.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double cosh (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float coshf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} coshl (long double @var{x})
+@standards{ISO, 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}}.
They may signal overflow if @var{x} is too large.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double tanh (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float tanhf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} tanhl (long double @var{x})
+@standards{ISO, 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})}}.
@@ -938,43 +745,28 @@ They may signal overflow if @var{x} is too large.
There are counterparts for the hyperbolic functions which take
complex arguments.
-@comment complex.h
-@comment ISO
@deftypefun {complex double} csinh (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} csinhf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} csinhl (complex long double @var{z})
+@standards{ISO, 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}}.
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} ccosh (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} ccoshf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} ccoshl (complex long double @var{z})
+@standards{ISO, 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}}.
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} ctanh (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} ctanhf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} ctanhl (complex long double @var{z})
+@standards{ISO, 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})}}.
@@ -983,44 +775,29 @@ defined mathematically as @w{@code{csinh (@var{z}) / ccosh (@var{z})}}.
@cindex inverse hyperbolic functions
-@comment math.h
-@comment ISO
@deftypefun double asinh (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float asinhf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} asinhl (long double @var{x})
+@standards{ISO, 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}.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double acosh (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float acoshf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} acoshl (long double @var{x})
+@standards{ISO, 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
@code{1}, @code{acosh} signals a domain error.
@end deftypefun
-@comment math.h
-@comment ISO
@deftypefun double atanh (double @var{x})
-@comment math.h
-@comment ISO
@deftypefunx float atanhf (float @var{x})
-@comment math.h
-@comment ISO
@deftypefunx {long double} atanhl (long double @var{x})
+@standards{ISO, 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
@@ -1030,44 +807,29 @@ if it is equal to 1, @code{atanh} returns infinity.
@cindex inverse complex hyperbolic functions
-@comment complex.h
-@comment ISO
@deftypefun {complex double} casinh (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} casinhf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} casinhl (complex long double @var{z})
+@standards{ISO, 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}.
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} cacosh (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} cacoshf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} cacoshl (complex long double @var{z})
+@standards{ISO, 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
the real-valued functions, there are no restrictions on the value of @var{z}.
@end deftypefun
-@comment complex.h
-@comment ISO
@deftypefun {complex double} catanh (complex double @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex float} catanhf (complex float @var{z})
-@comment complex.h
-@comment ISO
@deftypefunx {complex long double} catanhl (complex long double @var{z})
+@standards{ISO, 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
@@ -1084,15 +846,10 @@ the real-valued functions, there are no restrictions on the value of
These are some more exotic mathematical functions which are sometimes
useful. Currently they only have real-valued versions.
-@comment math.h
-@comment SVID
@deftypefun double erf (double @var{x})
-@comment math.h
-@comment SVID
@deftypefunx float erff (float @var{x})
-@comment math.h
-@comment SVID
@deftypefunx {long double} erfl (long double @var{x})
+@standards{SVID, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
@code{erf} returns the error function of @var{x}. The error
function is defined as
@@ -1106,29 +863,19 @@ erf (x) = 2/sqrt(pi) * integral from 0 to x of exp(-t^2) dt
@end ifnottex
@end deftypefun
-@comment math.h
-@comment SVID
@deftypefun double erfc (double @var{x})
-@comment math.h
-@comment SVID
@deftypefunx float erfcf (float @var{x})
-@comment math.h
-@comment SVID
@deftypefunx {long double} erfcl (long double @var{x})
+@standards{SVID, 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.
@end deftypefun
-@comment math.h
-@comment SVID
@deftypefun double lgamma (double @var{x})
-@comment math.h
-@comment SVID
@deftypefunx float lgammaf (float @var{x})
-@comment math.h
-@comment SVID
@deftypefunx {long double} lgammal (long double @var{x})
+@standards{SVID, 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
@@ -1159,30 +906,20 @@ The gamma function has singularities at the non-positive integers.
singularity.
@end deftypefun
-@comment math.h
-@comment XPG
@deftypefun double lgamma_r (double @var{x}, int *@var{signp})
-@comment math.h
-@comment XPG
@deftypefunx float lgammaf_r (float @var{x}, int *@var{signp})
-@comment math.h
-@comment XPG
@deftypefunx {long double} lgammal_r (long double @var{x}, int *@var{signp})
+@standards{XPG, 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.
@end deftypefun
-@comment math.h
-@comment SVID
@deftypefun double gamma (double @var{x})
-@comment math.h
-@comment SVID
@deftypefunx float gammaf (float @var{x})
-@comment math.h
-@comment SVID
@deftypefunx {long double} gammal (long double @var{x})
+@standards{SVID, math.h}
@safety{@prelim{}@mtunsafe{@mtasurace{:signgam}}@asunsafe{}@acsafe{}}
These functions exist for compatibility reasons. They are equivalent to
@code{lgamma} etc. It is better to use @code{lgamma} since for one the
@@ -1190,15 +927,15 @@ name reflects better the actual computation, and moreover @code{lgamma} is
standardized in @w{ISO C99} while @code{gamma} is not.
@end deftypefun
-@comment math.h
-@comment XPG, ISO
@deftypefun double tgamma (double @var{x})
-@comment math.h
-@comment XPG, ISO
@deftypefunx float tgammaf (float @var{x})
-@comment math.h
-@comment XPG, ISO
@deftypefunx {long double} tgammal (long double @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}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
@code{tgamma} applies the gamma function to @var{x}. The gamma
function is defined as
@@ -1214,57 +951,37 @@ gamma (x) = integral from 0 to @infinity{} of t^(x-1) e^-t dt
This function was introduced in @w{ISO C99}.
@end deftypefun
-@comment math.h
-@comment SVID
@deftypefun double j0 (double @var{x})
-@comment math.h
-@comment SVID
@deftypefunx float j0f (float @var{x})
-@comment math.h
-@comment SVID
@deftypefunx {long double} j0l (long double @var{x})
+@standards{SVID, 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.
@end deftypefun
-@comment math.h
-@comment SVID
@deftypefun double j1 (double @var{x})
-@comment math.h
-@comment SVID
@deftypefunx float j1f (float @var{x})
-@comment math.h
-@comment SVID
@deftypefunx {long double} j1l (long double @var{x})
+@standards{SVID, 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.
@end deftypefun
-@comment math.h
-@comment SVID
@deftypefun double jn (int @var{n}, double @var{x})
-@comment math.h
-@comment SVID
@deftypefunx float jnf (int @var{n}, float @var{x})
-@comment math.h
-@comment SVID
@deftypefunx {long double} jnl (int @var{n}, long double @var{x})
+@standards{SVID, 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.
@end deftypefun
-@comment math.h
-@comment SVID
@deftypefun double y0 (double @var{x})
-@comment math.h
-@comment SVID
@deftypefunx float y0f (float @var{x})
-@comment math.h
-@comment SVID
@deftypefunx {long double} y0l (long double @var{x})
+@standards{SVID, 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}
@@ -1272,15 +989,10 @@ is negative, @code{y0} signals a domain error; if it is zero,
@code{y0} signals overflow and returns @math{-@infinity}.
@end deftypefun
-@comment math.h
-@comment SVID
@deftypefun double y1 (double @var{x})
-@comment math.h
-@comment SVID
@deftypefunx float y1f (float @var{x})
-@comment math.h
-@comment SVID
@deftypefunx {long double} y1l (long double @var{x})
+@standards{SVID, 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}
@@ -1288,15 +1000,10 @@ is negative, @code{y1} signals a domain error; if it is zero,
@code{y1} signals overflow and returns @math{-@infinity}.
@end deftypefun
-@comment math.h
-@comment SVID
@deftypefun double yn (int @var{n}, double @var{x})
-@comment math.h
-@comment SVID
@deftypefunx float ynf (int @var{n}, float @var{x})
-@comment math.h
-@comment SVID
@deftypefunx {long double} ynl (int @var{n}, long double @var{x})
+@standards{SVID, 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}
@@ -1492,27 +1199,24 @@ To use these facilities, you should include the header file
@file{stdlib.h} in your program.
@pindex stdlib.h
-@comment stdlib.h
-@comment ISO
@deftypevr Macro int RAND_MAX
+@standards{ISO, stdlib.h}
The value of this macro is an integer constant representing the largest
value the @code{rand} function can return. In @theglibc{}, it is
@code{2147483647}, which is the largest signed integer representable in
32 bits. In other libraries, it may be as low as @code{32767}.
@end deftypevr
-@comment stdlib.h
-@comment ISO
@deftypefun int rand (void)
+@standards{ISO, stdlib.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}
@c Just calls random.
The @code{rand} function returns the next pseudo-random number in the
series. The value ranges from @code{0} to @code{RAND_MAX}.
@end deftypefun
-@comment stdlib.h
-@comment ISO
@deftypefun void srand (unsigned int @var{seed})
+@standards{ISO, stdlib.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}
@c Alias to srandom.
This function establishes @var{seed} as the seed for a new series of
@@ -1528,9 +1232,8 @@ POSIX.1 extended the C standard functions to support reproducible random
numbers in multi-threaded programs. However, the extension is badly
designed and unsuitable for serious work.
-@comment stdlib.h
-@comment POSIX.1
@deftypefun int rand_r (unsigned int *@var{seed})
+@standards{POSIX.1, stdlib.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function returns a random number in the range 0 to @code{RAND_MAX}
just as @code{rand} does. However, all its state is stored in the
@@ -1555,9 +1258,8 @@ with @theglibc{}; we support them for BSD compatibility only.
The prototypes for these functions are in @file{stdlib.h}.
@pindex stdlib.h
-@comment stdlib.h
-@comment BSD
@deftypefun {long int} random (void)
+@standards{BSD, stdlib.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}
@c Takes a lock and calls random_r with an automatic variable and the
@c global state, while holding a lock.
@@ -1571,9 +1273,8 @@ differently. Users must always be aware of the 32-bit limitation,
though.
@end deftypefun
-@comment stdlib.h
-@comment BSD
@deftypefun void srandom (unsigned int @var{seed})
+@standards{BSD, stdlib.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}
@c Takes a lock and calls srandom_r with an automatic variable and a
@c static buffer. There's no MT-safety issue because the static buffer
@@ -1588,9 +1289,8 @@ To produce a different set of pseudo-random numbers each time your
program runs, do @code{srandom (time (0))}.
@end deftypefun
-@comment stdlib.h
-@comment BSD
@deftypefun {char *} initstate (unsigned int @var{seed}, char *@var{state}, size_t @var{size})
+@standards{BSD, stdlib.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}
The @code{initstate} function is used to initialize the random number
generator state. The argument @var{state} is an array of @var{size}
@@ -1603,9 +1303,8 @@ You can use this value later as an argument to @code{setstate} to
restore that state.
@end deftypefun
-@comment stdlib.h
-@comment BSD
@deftypefun {char *} setstate (char *@var{state})
+@standards{BSD, stdlib.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@asulock{}}@acunsafe{@aculock{}}}
The @code{setstate} function restores the random number state
information @var{state}. The argument must have been the result of
@@ -1632,9 +1331,8 @@ following interfaces.
The @file{stdlib.h} header contains a definition of the following type:
-@comment stdlib.h
-@comment GNU
@deftp {Data Type} {struct random_data}
+@standards{GNU, stdlib.h}
Objects of type @code{struct random_data} contain the information
necessary to represent the state of the PRNG. Although a complete
@@ -1644,36 +1342,32 @@ definition of the type is present the type should be treated as opaque.
The functions modifying the state follow exactly the already described
functions.
-@comment stdlib.h
-@comment GNU
@deftypefun int random_r (struct random_data *restrict @var{buf}, int32_t *restrict @var{result})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buf}}@assafe{}@acunsafe{@acucorrupt{}}}
The @code{random_r} function behaves exactly like the @code{random}
function except that it uses and modifies the state in the object
pointed to by the first parameter instead of the global state.
@end deftypefun
-@comment stdlib.h
-@comment GNU
@deftypefun int srandom_r (unsigned int @var{seed}, struct random_data *@var{buf})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buf}}@assafe{}@acunsafe{@acucorrupt{}}}
The @code{srandom_r} function behaves exactly like the @code{srandom}
function except that it uses and modifies the state in the object
pointed to by the second parameter instead of the global state.
@end deftypefun
-@comment stdlib.h
-@comment GNU
@deftypefun int initstate_r (unsigned int @var{seed}, char *restrict @var{statebuf}, size_t @var{statelen}, struct random_data *restrict @var{buf})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buf}}@assafe{}@acunsafe{@acucorrupt{}}}
The @code{initstate_r} function behaves exactly like the @code{initstate}
function except that it uses and modifies the state in the object
pointed to by the fourth parameter instead of the global state.
@end deftypefun
-@comment stdlib.h
-@comment GNU
@deftypefun int setstate_r (char *restrict @var{statebuf}, struct random_data *restrict @var{buf})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buf}}@assafe{}@acunsafe{@acucorrupt{}}}
The @code{setstate_r} function behaves exactly like the @code{setstate}
function except that it uses and modifies the state in the object
@@ -1718,9 +1412,8 @@ The prototypes for these functions are in @file{stdlib.h}.
@pindex stdlib.h
-@comment stdlib.h
-@comment SVID
@deftypefun double drand48 (void)
+@standards{SVID, stdlib.h}
@safety{@prelim{}@mtunsafe{@mtasurace{:drand48}}@asunsafe{}@acunsafe{@acucorrupt{}}}
@c Uses of the static state buffer are not guarded by a lock (thus
@c @mtasurace:drand48), so they may be found or left at a
@@ -1737,9 +1430,8 @@ generator. These are (of course) chosen to be the least significant
bits and they are initialized to @code{0}.
@end deftypefun
-@comment stdlib.h
-@comment SVID
@deftypefun double erand48 (unsigned short int @var{xsubi}[3])
+@standards{SVID, stdlib.h}
@safety{@prelim{}@mtunsafe{@mtasurace{:drand48}}@asunsafe{}@acunsafe{@acucorrupt{}}}
@c The static buffer is just initialized with default parameters, which
@c are later read to advance the state held in xsubi.
@@ -1752,9 +1444,8 @@ guarantee random numbers. The array should have been initialized before
initial use to obtain reproducible results.
@end deftypefun
-@comment stdlib.h
-@comment SVID
@deftypefun {long int} lrand48 (void)
+@standards{SVID, stdlib.h}
@safety{@prelim{}@mtunsafe{@mtasurace{:drand48}}@asunsafe{}@acunsafe{@acucorrupt{}}}
The @code{lrand48} function returns an integer value in the range of
@code{0} to @code{2^31} (exclusive). Even if the size of the @code{long
@@ -1763,9 +1454,8 @@ The random bits are determined by the global state of the random number
generator in the C library.
@end deftypefun
-@comment stdlib.h
-@comment SVID
@deftypefun {long int} nrand48 (unsigned short int @var{xsubi}[3])
+@standards{SVID, stdlib.h}
@safety{@prelim{}@mtunsafe{@mtasurace{:drand48}}@asunsafe{}@acunsafe{@acucorrupt{}}}
This function is similar to the @code{lrand48} function in that it
returns a number in the range of @code{0} to @code{2^31} (exclusive) but
@@ -1778,18 +1468,16 @@ number generator). The array should have been initialized before the
first call to obtain reproducible results.
@end deftypefun
-@comment stdlib.h
-@comment SVID
@deftypefun {long int} mrand48 (void)
+@standards{SVID, stdlib.h}
@safety{@prelim{}@mtunsafe{@mtasurace{:drand48}}@asunsafe{}@acunsafe{@acucorrupt{}}}
The @code{mrand48} function is similar to @code{lrand48}. The only
difference is that the numbers returned are in the range @code{-2^31} to
@code{2^31} (exclusive).
@end deftypefun
-@comment stdlib.h
-@comment SVID
@deftypefun {long int} jrand48 (unsigned short int @var{xsubi}[3])
+@standards{SVID, stdlib.h}
@safety{@prelim{}@mtunsafe{@mtasurace{:drand48}}@asunsafe{}@acunsafe{@acucorrupt{}}}
The @code{jrand48} function is similar to @code{nrand48}. The only
difference is that the numbers returned are in the range @code{-2^31} to
@@ -1801,9 +1489,8 @@ The internal state of the random number generator can be initialized in
several ways. The methods differ in the completeness of the
information provided.
-@comment stdlib.h
-@comment SVID
@deftypefun void srand48 (long int @var{seedval})
+@standards{SVID, stdlib.h}
@safety{@prelim{}@mtunsafe{@mtasurace{:drand48}}@asunsafe{}@acunsafe{@acucorrupt{}}}
The @code{srand48} function sets the most significant 32 bits of the
internal state of the random number generator to the least
@@ -1821,9 +1508,8 @@ are reset to the default values given above. This is of importance once
the user has called the @code{lcong48} function (see below).
@end deftypefun
-@comment stdlib.h
-@comment SVID
@deftypefun {unsigned short int *} seed48 (unsigned short int @var{seed16v}[3])
+@standards{SVID, stdlib.h}
@safety{@prelim{}@mtunsafe{@mtasurace{:drand48}}@asunsafe{}@acunsafe{@acucorrupt{}}}
The @code{seed48} function initializes all 48 bits of the state of the
internal random number generator from the contents of the parameter
@@ -1849,9 +1535,8 @@ There is one more function to initialize the random number generator
which enables you to specify even more information by allowing you to
change the parameters in the congruential formula.
-@comment stdlib.h
-@comment SVID
@deftypefun void lcong48 (unsigned short int @var{param}[7])
+@standards{SVID, stdlib.h}
@safety{@prelim{}@mtunsafe{@mtasurace{:drand48}}@asunsafe{}@acunsafe{@acucorrupt{}}}
The @code{lcong48} function allows the user to change the complete state
of the random number generator. Unlike @code{srand48} and
@@ -1882,9 +1567,8 @@ obtain an individual random number generator.
The user-supplied buffer must be of type @code{struct drand48_data}.
This type should be regarded as opaque and not manipulated directly.
-@comment stdlib.h
-@comment GNU
@deftypefun int drand48_r (struct drand48_data *@var{buffer}, double *@var{result})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buffer}}@assafe{}@acunsafe{@acucorrupt{}}}
This function is equivalent to the @code{drand48} function with the
difference that it does not modify the global random number generator
@@ -1900,9 +1584,8 @@ This function is a GNU extension and should not be used in portable
programs.
@end deftypefun
-@comment stdlib.h
-@comment GNU
@deftypefun int erand48_r (unsigned short int @var{xsubi}[3], struct drand48_data *@var{buffer}, double *@var{result})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buffer}}@assafe{}@acunsafe{@acucorrupt{}}}
The @code{erand48_r} function works like @code{erand48}, but in addition
it takes an argument @var{buffer} which describes the random number
@@ -1917,9 +1600,8 @@ This function is a GNU extension and should not be used in portable
programs.
@end deftypefun
-@comment stdlib.h
-@comment GNU
@deftypefun int lrand48_r (struct drand48_data *@var{buffer}, long int *@var{result})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buffer}}@assafe{}@acunsafe{@acucorrupt{}}}
This function is similar to @code{lrand48}, but in addition it takes a
pointer to a buffer describing the state of the random number generator
@@ -1932,9 +1614,8 @@ This function is a GNU extension and should not be used in portable
programs.
@end deftypefun
-@comment stdlib.h
-@comment GNU
@deftypefun int nrand48_r (unsigned short int @var{xsubi}[3], struct drand48_data *@var{buffer}, long int *@var{result})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buffer}}@assafe{}@acunsafe{@acucorrupt{}}}
The @code{nrand48_r} function works like @code{nrand48} in that it
produces a random number in the range @code{0} to @code{2^31}. But instead
@@ -1949,9 +1630,8 @@ This function is a GNU extension and should not be used in portable
programs.
@end deftypefun
-@comment stdlib.h
-@comment GNU
@deftypefun int mrand48_r (struct drand48_data *@var{buffer}, long int *@var{result})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buffer}}@assafe{}@acunsafe{@acucorrupt{}}}
This function is similar to @code{mrand48} but like the other reentrant
functions it uses the random number generator described by the value in
@@ -1964,9 +1644,8 @@ This function is a GNU extension and should not be used in portable
programs.
@end deftypefun
-@comment stdlib.h
-@comment GNU
@deftypefun int jrand48_r (unsigned short int @var{xsubi}[3], struct drand48_data *@var{buffer}, long int *@var{result})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buffer}}@assafe{}@acunsafe{@acucorrupt{}}}
The @code{jrand48_r} function is similar to @code{jrand48}. Like the
other reentrant functions of this function family it uses the
@@ -1999,9 +1678,8 @@ buffer from looking at the parameter to the function, it is highly
recommended to use these functions since the result might not always be
what you expect.
-@comment stdlib.h
-@comment GNU
@deftypefun int srand48_r (long int @var{seedval}, struct drand48_data *@var{buffer})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buffer}}@assafe{}@acunsafe{@acucorrupt{}}}
The description of the random number generator represented by the
information in @var{buffer} is initialized similarly to what the function
@@ -2015,9 +1693,8 @@ This function is a GNU extension and should not be used in portable
programs.
@end deftypefun
-@comment stdlib.h
-@comment GNU
@deftypefun int seed48_r (unsigned short int @var{seed16v}[3], struct drand48_data *@var{buffer})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buffer}}@assafe{}@acunsafe{@acucorrupt{}}}
This function is similar to @code{srand48_r} but like @code{seed48} it
initializes all 48 bits of the state from the parameter @var{seed16v}.
@@ -2032,9 +1709,8 @@ This function is a GNU extension and should not be used in portable
programs.
@end deftypefun
-@comment stdlib.h
-@comment GNU
@deftypefun int lcong48_r (unsigned short int @var{param}[7], struct drand48_data *@var{buffer})
+@standards{GNU, stdlib.h}
@safety{@prelim{}@mtsafe{@mtsrace{:buffer}}@assafe{}@acunsafe{@acucorrupt{}}}
This function initializes all aspects of the random number generator
described in @var{buffer} with the data in @var{param}. Here it is