Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?laran

Returns a random real number from a uniform distribution.

Syntax

res = slaran (iseed)

res = dlaran (iseed)

Description

The ?laran routine returns a random real number from a uniform (0,1) distribution. This routine uses a multiplicative congruential method with modulus 248 and multiplier 33952834046453. 48-bit integers are stored in four integer array elements with 12 bits per element. Hence the routine is portable across machines with integers of 32 bits or more.

Input Parameters

iseed

INTEGER. Array, size 4. On entry, the seed of the random number generator. The array elements must be between 0 and 4095, and iseed(4) must be odd.

Output Parameters

iseed

INTEGER.

On exit, the seed is updated.

res

REAL for slaran,

DOUBLE PRECISION for dlaran,

Random number.