RANEXP Function

Returns a random variate from an exponential distribution.

Category: Random Number
Tip: If you want to change the seed value during execution, you must use the CALL RANEXP routine instead of the RANEXP function.



Required Argument


is a numeric constant, variable, or expression with an integer value. If seed ≤ 0, the time of day is used to initialize the seed stream.

Range seed < 231−1
See Seed Values for more information about seed values


The RANEXP function returns a variate that is generated from an exponential distribution with parameter 1. An inverse transform method applied to a RANUNI uniform variate is used.
An exponential variate X with parameter LAMBDA can be generated:
An extreme value variate X with location parameter ALPHA and scale parameter BETA can be generated:
A geometric variate X with parameter P can be generated as follows:
For a discussion about seeds and streams of data, as well as examples of using the random-number functions, see Generating Multiple Variables from One Seed in Random-Number Functions .


The CALL RANEXP routine, an alternative to the RANEXP function, gives greater control of the seed and random number streams.

See Also

CALL Routines: