2 Specification

3 Description

The distribution has PDF (probability density function)

fx=1xσ⁢2πexp-ln⁡x-μ22σ2if ​x>0,fx=0otherwise,

i.e., ln⁡x is normally distributed with mean μ and variance σ2. nag_rngs_lognormal (g05lkc) evaluates exp⁡yi, where the yi are generated by nag_rngs_normal (g05lac) from a Normal distribution with mean μ and variance σ2.

6 Error Indicators and Warnings

An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.

NE_REAL

On entry, var=value.
Constraint: var≥0.0.

7 Accuracy

Not applicable.

8 Further Comments

None.

9 Example

This example prints five pseudorandom numbers from a log-normal distribution with mean 1.0 and variance 2.0, generated by a single call to nag_rngs_lognormal (g05lkc), after initialization by nag_rngs_init_repeatable (g05kbc).