-
Notifications
You must be signed in to change notification settings - Fork 103
/
randomgaussian.3
59 lines (59 loc) · 1.66 KB
/
randomgaussian.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
55
56
57
58
59
.\" 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 "randomgaussian" "1" "2021-02-15" "Fortran 95" "SHTOOLS 4.11"
.hy
.SH RandomGaussian
.PP
Return a pseudo-Gaussian deviate of zero mean and unit variance.
.SH Usage
.PP
\f[V]rg\f[R] = RandomGaussian (\f[V]seed\f[R])
.SH Parameters
.TP
\f[V]rg\f[R] : output, real(dp)
The radom Gaussian 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]RandomGaussian\f[R] will return a Gaussian random deviate with unit
variance and zero mean.
The underlying random number generator uses the algorithm of Park and
Miller combined with a Marsaglia shift sequence, which is claimed to
have a periodicity of about 3.1 10\[ha]18.
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.
To obtain a Gaussian deviate with a standard deviation of
\f[V]sigma\f[R], it is only necessary to multiply the unit variance
deviate by \f[V]sigma\f[R].
.PP
This is a slightly modified version of the algorithm that was published
in NUMERICAL RECIPES as GASDEV.
.SH References
.PP
Press, W.H., S.A.
Teukolsky, W.T.
Vetterling, and B.P.
Flannery, Numerical Recipes in FORTRAN: The Art of Scientific Computing,
2nd ed., Cambridge Univ.
Press, Cambridge, UK, 1992.
.SH See also
.PP
randomn