]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/random.3
Automated unformatting of parentheses using unformat_parens.sh
[thirdparty/man-pages.git] / man3 / random.3
index 7235fcd0bfe6861c7560bf4b032e293b846f3968..e75d7593b74bf8b4ded57562c751f71fa8a1650a 100644 (file)
@@ -44,41 +44,41 @@ random, srandom, initstate, setstate \- random number generator
 .BI "char *setstate(char *" state );
 .fi
 .SH DESCRIPTION
-The \fBrandom()\fP function uses a non-linear additive feedback random
+The \fBrandom\fP() function uses a non-linear additive feedback random
 number generator employing a default table of size 31 long integers to
 return successive pseudo-random numbers in the range from 0 to \fBRAND_MAX\fR.
 The period of this random number generator is very large, approximately
 16*((2**31)\-1).
 .PP
-The \fBsrandom()\fP function sets its argument as the seed for a new
-sequence of pseudo-random integers to be returned by \fBrandom()\fP.
-These sequences are repeatable by calling \fBsrandom()\fP with the same
-seed value.  If no seed value is provided, the \fBrandom()\fP function 
+The \fBsrandom\fP() function sets its argument as the seed for a new
+sequence of pseudo-random integers to be returned by \fBrandom\fP().
+These sequences are repeatable by calling \fBsrandom\fP() with the same
+seed value.  If no seed value is provided, the \fBrandom\fP() function 
 is automatically seeded with a value of 1.
 .PP
-The \fBinitstate()\fP function allows a state array \fIstate\fP to
-be initialized for use by \fBrandom()\fP.  The size of the state array
-\fIn\fP is used by \fBinitstate()\fP to decide how sophisticated a
+The \fBinitstate\fP() function allows a state array \fIstate\fP to
+be initialized for use by \fBrandom\fP().  The size of the state array
+\fIn\fP is used by \fBinitstate\fP() to decide how sophisticated a
 random number generator it should use \(em the larger the state array,
 the better the random numbers will be.  \fIseed\fP is the seed for the
 initialization, which specifies a starting point for the random number
 sequence, and provides for restarting at the same point.
 .PP
-The \fBsetstate()\fP function changes the state array used by the
-\fBrandom()\fP function.  The state array \fIstate\fP is used for
-random number generation until the next call to \fBinitstate()\fP
-or \fBsetstate()\fP.  \fIstate\fP must first have been initialized 
-using \fBinitstate()\fP or be the result of a previous call of
-\fBsetstate()\fP.
+The \fBsetstate\fP() function changes the state array used by the
+\fBrandom\fP() function.  The state array \fIstate\fP is used for
+random number generation until the next call to \fBinitstate\fP()
+or \fBsetstate\fP().  \fIstate\fP must first have been initialized 
+using \fBinitstate\fP() or be the result of a previous call of
+\fBsetstate\fP().
 .SH "RETURN VALUE"
-The \fBrandom()\fP function returns a value between 0 and RAND_MAX.
-The \fBsrandom()\fP function returns no value.  The \fBinitstate()\fP 
-and \fBsetstate()\fP functions return a pointer to the previous state 
+The \fBrandom\fP() function returns a value between 0 and RAND_MAX.
+The \fBsrandom\fP() function returns no value.  The \fBinitstate\fP() 
+and \fBsetstate\fP() functions return a pointer to the previous state 
 array, or NULL on error.
 .SH ERRORS
 .TP
 .B EINVAL
-A state array of less than 8 bytes was specified to \fBinitstate()\fP.
+A state array of less than 8 bytes was specified to \fBinitstate\fP().
 .SH NOTES
 Current "optimal" values for the size of the state array \fIn\fP are
 8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to