      REAL FUNCTION JMRANF()
 
      INTEGER SEED
      COMMON /GERME/SEED
 
      INTEGER A,M,Q,R
      PARAMETER(A=16807,M=2147483647,Q=127773,R=2836)
 
      INTEGER LO,HI,TEST
 
      HI = SEED/Q
      LO = SEED-HI*Q
      TEST = A*LO-R*HI
      IF(TEST.GT.0) THEN
        SEED = TEST
      ELSE
        SEED = TEST+M
      ENDIF
 
      JMRANF = FLOAT(SEED)/FLOAT(M)
 
      END
      BLOCK DATA RANBD

      INTEGER SEED
      COMMON /GERME/SEED

      DATA SEED/1/

      END
