主题:求助:fortran中rand()的问题
我在用fortran进行金属纳米线的结构优化,从老师那里拷的程序中有如下几句
IF(RAND1().LE.PCOPY) THEN
JP=INT(NP*RAND3())+1
WRITE(*,*) 'COPY AND MUTATION FROM PARENT',JP
DO 110 I=1,NA
X(I)=XP(JP,I)
Y(I)=YP(JP,I)
Z(I)=ZP(JP,I)
110 CONTINUE
CALL MUTATION(NA,X,Y,Z,ALAT,RMAX)
IP=JP
GOTO 140
END IF
120 IP=INT(NP*RAND3())+1
JP=INT(NP*RAND3())+1
请问那个rand1()和rand3()值是多少啊?谢谢啦~我刚接触,好头疼
IF(RAND1().LE.PCOPY) THEN
JP=INT(NP*RAND3())+1
WRITE(*,*) 'COPY AND MUTATION FROM PARENT',JP
DO 110 I=1,NA
X(I)=XP(JP,I)
Y(I)=YP(JP,I)
Z(I)=ZP(JP,I)
110 CONTINUE
CALL MUTATION(NA,X,Y,Z,ALAT,RMAX)
IP=JP
GOTO 140
END IF
120 IP=INT(NP*RAND3())+1
JP=INT(NP*RAND3())+1
请问那个rand1()和rand3()值是多少啊?谢谢啦~我刚接触,好头疼