JRAND48 - obtain long random integer.

(Compatible with UNIX System V C)

Usage:

long jrand48();
r = jrand48(work);

Where:

unsigned short work[3];
is a work vector used in generating the pseudo-random numbers.
double r;
is a pseudo-random number greater than or equal to -2**31 and strictly less than 2**31.

Description:

"jrand48" returns a pseudo-random integer in the range [-2**31,2**31). The random generator used is the linear congruential algorithm and 48-bit integer arithmetic.

The "work" vector holds information from one invocation of "jrand48" to the next. If you always initialize the elements of "work" to the same values, you will always get the same sequence of random numbers.

See Also:

expl c lib seed48
expl c lib srand48
expl c lib drand48
expl c lib erand48
expl c lib lrand48
expl c lib mrand48
expl c lib nrand48
expl c lib lcong48
expl c lib rand

Copyright © 1996, Thinkage Ltd.