Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/gipsy/sub/ran.dc2
Дата изменения: Thu Jan 23 17:11:35 1992
Дата индексирования: Thu Jan 15 20:38:44 2009
Кодировка:

Function: RAN

Purpose: Returns a uniform random deviate between 0.0 and 1.0.

Category: MATH

Files: ran.c

Author: K.G. Begeman

Use: REAL RAN( SEED ) Input/Output INTEGER

RAN Uniform random deviate between 0.0 and 1.0.
SEED A negative value for SEED reintializes the
sequence with seed -SEED and on exit SEED
will be one.
A positive value for SEED has no effect except
for the first call to RAN. Then it initializes
the sequence with seed SEED and on exit SEED
will be one.

Description: The random numbers are obtained with the subtractive
method described by Knuth (Knuth, D.E. 1981, Seminumerical
Algorithms, 2nd ed., vol. 2 of The Art of Computer
Programming).

Updates: May 25, 1990: KGB, Document created.