double FUNCTION c_randnm (seed)
long *seed;
Specifies seed value to be used by the random number generator.
This random number generator is designed to work consistently on all systems that have 32 bit integers (long). It generates a random number between 0 and 1.
The value of seed is critical to the correct operation of this routine. The seed value should be set by the calling routine only when a new sequence of random numbers is desired. All subsequent calls to c_randnm() will produce random numbers using the seed value that was set during the previous invocation of c_randnm().
In order to verify that random number generator is working properly on any particular system, start with a seed value of 1 and generate 10,000 random numbers. Then check the seed value returned by c_randnm() -- it should have a value of 1043618065. If it does not, the implementation of the algorithm is incorrect.
The algorithm was taken from the October 1988 issue of Communications of the ACM Volume 31. The article is titled RANDOM NUMBER GENERATORS: GOOD ONES ARE HARD TO FIND by Stephen K. Park and Keith W. Miller.
c_randnm() returns
Random number between 0 and 1 (as double)
The c_randnm() call is for C only.