C COMPILE WITH /I4 SWITCH.
	FUNCTION RNDF(DUM)
C GENERATE RANDOM NUMBER BY LINEAR CONGRUENCE IN BIG
C INTEGERS.
	REAL*4 R
	REAL*8 XX
	INTEGER*4 DUM
	INTEGER*4 I,II
	LOGICAL*4 L,LMSK
	EQUIVALENCE(I,L),(II,LMSK)
	XX=DUM
	XX=XX*214013.D0+2531011.0D0
	XX=DMOD(XX,16777216.D0)
	I=XX
C USE MASKING TO ZOT THIS INTO NORMAL RANGE
	II=16777215
	L=L.AND.LMSK
	DUM=I
C RETURN RANDOM BETWEEN 0 AND 1.0
C PERIOD OF 2**24 MAX
	R=FLOAT(I)/16777216.
	RNDF=R
	RETURN
	END
