nag_rand_exp (g05sfc) generates a vector of pseudorandom numbers from a (negative) exponential distribution with mean .
The exponential distribution has PDF (probability density function):
nag_rand_exp (g05sfc) returns the values
are the next
numbers generated by a uniform
One of the initialization functions nag_rand_init_repeatable (g05kfc)
(for a repeatable sequence if computed sequentially) or nag_rand_init_nonrepeatable (g05kgc)
(for a non-repeatable sequence) must be called prior to the first call to nag_rand_exp (g05sfc).
This example prints five pseudorandom numbers from an exponential distribution with mean
, generated by a single call to nag_rand_exp (g05sfc), after initialization by nag_rand_init_repeatable (g05kfc)