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

◆ RanfArrNorm_sub()

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

53 bit real normal random number (Ziggurat method) (Lagged Fibonacci method) (Subroutine version)

Purpose
Generates 53 bit real normal random number following normal distribution N(μ, σ^2).
An uniform random number is generated by the random number generator based on the Lagged Fibonacci method RanfArrNext(). Then it is transformed to the normal random number by Ziggurat method.
Parameters
[out]Ret53 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
  • D. E. Knuth, “The Art of Computer Programming Third Edition, Vol.2 / Seminumerical Algorithms”, Addison Wesley Longman, 1998.
  • Yatsuji Tetsuaki, "Probability distribution random number generation method" 2nd ed., Pleiades Publishing, 2019. (Japanese book)