Previous Page | Next Page

Functions and CALL Routines

RANCAU Function



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.

Syntax
Arguments
Details
Comparisons
See Also

Syntax

RANCAU(seed)


Arguments

seed

is a numeric constant, variable, or expression with an integer value. If seed [le] 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

Details

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 [equation], 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);

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.


Comparisons

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


See Also

Functions and CALL routines:

RAND Function

CALL RANCAU Routine

Previous Page | Next Page | Top of Page