-
Notifications
You must be signed in to change notification settings - Fork 104
/
randomn.3
54 lines (54 loc) · 1.45 KB
/
randomn.3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.\" Automatically generated by Pandoc 3.1.3
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "randomn" "1" "2021-02-15" "Fortran 95" "SHTOOLS 4.11"
.hy
.SH RandomN
.PP
Return a pseudo uniform random deviate between 0 and 1 using the
algorithm of Park and Miller with a Marsaglia shift sequence.
.SH Usage
.PP
\f[V]rn\f[R] = RandomN (\f[V]seed\f[R])
.SH Parameters
.TP
\f[V]rn\f[R] : output, real(dp)
The uniform random deviate.
.TP
\f[V]seed\f[R] : input/output, integer(int32)
Input a negative integer to (re-)initialize the random number generator.
Afterwards, this argument should not be modified.
.SH Description
.PP
\f[V]RandomN\f[R] will return a uniform random deviate between 0 and 1
(exclusive of the endpoints) using the algorithm of Park and Miller
combined with a Marsaglia shift sequence.
The random number generator is intialized by calling with a negative
value of \f[V]seed\f[R], and afterwards this variable should not be
modified.
The period of this generator is claimed to be about 3.1 10\[ha]18 (see
Press et al.\ 2002).
.SH References
.PP
Press, W.H., S.A.
Teukolsky, W.T.
Vetterling, and B.P.
Flannery, Numerical Recipes in FORTRAN 90: Volume 2 of FORTRAN numerical
recipes, 2nd ed., Cambridge Univ.
Press, Cambridge, UK, 2002.
.SH See also
.PP
randomgaussian