5 implicit double precision(a-h,o-z)
6 INTEGER idum,im1,im2,imm1,ia1,ia2,iq1,iq2,ir1,ir2,ntab,ndiv
7 INTEGER idum2,j,k,iv,iy
8 common/rand2/ iy,idum2,iv(32),ixyz(65)
10 parameter(im1=2147483563,im2=2147483399,am=1.d0/im1,imm1=im1-1,
11 *ia1=40014,ia2=40692,iq1=53668,iq2=52774,ir1=12211,ir2=3791,
12 *ntab=32,ndiv=1+imm1/ntab,eps=1.2d-7,rnmx=1.d0-eps)
22 idum=ia1*(idum-k*iq1)-k*ir1
23 if (idum.lt.0) idum=idum+im1
24 if (j.le.ntab) iv(j)=idum
29 idum=ia1*(idum-k*iq1)-k*ir1
30 if (idum.lt.0) idum=idum+im1
32 idum2=ia2*(idum2-k*iq2)-k*ir2
33 if (idum2.lt.0) idum2=idum2+im2