Generates random, normally distributed values via the Box-Muller transform.
Generates a pair of independent, standard, normally distributed random values using the Box-Muller transform.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | mu |
The mean of the distribution. |
||
real(kind=real64), | intent(in) | :: | sigma |
The standard deviation of the distribution. |
The pair of random values.
Generates an array of normally distributed random values sampled by the Box-Muller transform.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | mu |
The mean of the distribution. |
||
real(kind=real64), | intent(in) | :: | sigma |
The standard deviation of the distribution. |
||
integer(kind=int32), | intent(in) | :: | n |
The number of Box-Muller pairs to generate. |
A 2N-element array containing the N Box-Muller pairs.