Returns a random variate from a Cauchy distribution
Category: Random Number
Tip: If you want to change the seed value during execution, you must use the CALL RANCAU routine instead of the RANCAU function.
RANCAU ( seed )
seed
is an integer. If seed ‰ 0, the time of day is used to initialize the seed stream.
Range: seed < 2 31 -1
See: 'Seed Values' on page 257 for more information about seed values
The RANCAU function returns a variate that is generated from a Cauchy distribution with location parameter 0 and scale parameter 1. An acceptance- rejection procedure applied to RANUNI uniform variates is used. If u and v are independent uniform (-1/2, 1/2) variables and u 2 + v 2 ‰ 1/4, then u / v is a Cauchy variate. A Cauchy variate X with location parameter ALPHA and scale parameter BETA can be generated:
x=alpha+beta*rancau(seed);
The CALL RANCAU routine, an alternative to the RANCAU function, gives greater control of the seed and random number streams.
Call routine:
'CALL RANCAU Routine' on page 368