PRDNOR and PRDUNI: Generating Reproducible Random Numbers

How to:

The PRDNOR and PRDUNI functions generate reproducible random numbers.


Top of page

x
Syntax: How to Generate Reproducible Random Numbers
{PRDNOR|PRDUNI}(seed, output_format)

where:

PRDNOR

Generates reproducible double-precision random numbers normally distributed with an arithmetic mean of 0 and a standard deviation of 1.

PRDUNI

Generates reproducible double-precision random numbers uniformly distributed between 0 and 1.

seed

Numeric

Is the seed or the field that contains the seed, up to nine bytes. The seed is truncated to an integer. Using the same seed always produces the same set of numbers.

output_format

Double-precision



Example: Generating Reproducible Random Numbers

PRDNOR assigns random numbers and stores them in a column with the format D12.2.

PRDNOR(40, 'D12.2')

iWay Software