XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Drand48Norm_sub()

Sub Drand48Norm_sub ( Ret As  Double,
Optional Mu As  Double = 0,
Optional Sigma As  Double = 1 
)

48 bit real normal random number (Ziggurat method) (Linear congruential method) (Subroutine version)

Purpose
Generates 48 bit real normal random number following normal distribution N(μ, σ^2).
An uniform random number is generated by the random number generator drand48() which is based on the linear congruential method. Then it is transformed to the normal random number by Ziggurat method.
Parameters
[out]Ret48 bit real normal random number.
[in]Mu(Optional)
The parameter μ(mean) of the normal distribution N(μ, σ^2). (default = 0)
[in]Sigma(Optional)
The parameter σ(standard deviation) of the normal distribution N(μ, σ^2). (default = 1)
Reference
Yatsuji Tetsuaki, "Probability distribution random number generation method" 2nd ed., Pleiades Publishing, 2019. (Japanese book)