00001 REAL FUNCTION ranf() 00002 C********************************************************************** 00003 C 00004 C REAL FUNCTION RANF() 00005 C RANDom number generator as a Function 00006 C 00007 C Returns a random floating point number from a uniform distribution 00008 C over 0 - 1 (endpoints of this interval are not returned) using the 00009 C current generator 00010 C 00011 C This is a transcription from Pascal to Fortran of routine 00012 C Uniform_01 from the paper 00013 C 00014 C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package 00015 C with Splitting Facilities." ACM Transactions on Mathematical 00016 C Software, 17:98-111 (1991) 00017 C 00018 C********************************************************************** 00019 C .. External Functions .. 00020 INTEGER ignlgi 00021 EXTERNAL ignlgi 00022 C .. 00023 C .. Executable Statements .. 00024 C 00025 C 4.656613057E-10 is 1/M1 M1 is set in a data statement in IGNLGI 00026 C and is currently 2147483563. If M1 changes, change this also. 00027 C 00028 ranf = ignlgi()*4.656613057E-10 00029 RETURN 00030 00031 END