1 C $Date: 1994/10/04 16:19:52 $
5 C See help for RANDOMV on the PSFSHARE disk to understand these
6 C subroutines. This is the VS Fortran version of this code.
11 COMMON /VRANDD/ A, I, I147
12 INTEGER LOOP,I,I147,VEC(N)
15 IF(.NOT.(I.GE.251))GOTO 23002
19 IF(.NOT.(I147.GE.251))GOTO 23004
22 A(I)=IEOR(A(I147),A(I))
29 DOUBLE PRECISION FUNCTION RNDV(IDUM)
30 DOUBLE PRECISION RM1,RM2,R(99)
31 INTEGER IA1,IC1,M1, IA2,IC2,M2, IA3,IC3,M3, IDUM
33 DATA IA1,IC1,M1/1279,351762,1664557/
34 DATA IA2,IC2,M2/2011,221592,1048583/
35 DATA IA3,IC3,M3/15551,6150,29101/
36 IF(.NOT.(IDUM.LT.0))GOTO 23006
38 IX1 = MOD(IA1*IX1+IC1,M1)
40 IX1 = MOD(IA1*IX1+IC1,M1)
45 IX1 = MOD(IA1*IX1+IC1,M1)
46 IX2 = MOD(IA2*IX2+IC2,M2)
47 R(J) = (DBLE(IX1)+DBLE(IX2)*RM2)*RM1
50 IX1 = MOD(IA1*IX1+IC1,M1)
51 IX2 = MOD(IA2*IX2+IC2,M2)
52 IX3 = MOD(IA3*IX3+IC3,M3)
55 R(J) = (DBLE(IX1)+DBLE(IX2)*RM2)*RM1
61 SUBROUTINE VRNDST(SEED)
62 INTEGER A(250),LOOP,IDUM,SEED
64 COMMON /VRANDD/ A, I, I147
69 A(LOOP)=INT(RNDV(IDUM)*2147483647)
75 SUBROUTINE VRNDIN(IODEV)
77 COMMON/VRANDD/ A, I, I147
78 READ(IODEV) A, I, I147
83 SUBROUTINE VRNDOU(IODEV)
84 C This corresponds to VRNDOUT in the APFTN64 version
86 COMMON/VRANDD/ A, I, I147
87 WRITE(IODEV) A, I, I147
92 DATA FCTOR /2147483647.0D0/
93 C We get only one random number, here! DR 9/1/92
95 RNUNF= DBLE( IRAN1(1) ) / FCTOR
96 C******************************
97 C write(6,*) 'rnunf in rnunf = ',rnunf