PROGRAM RYA TEST C This program tests the coefficients calculated by the programs trntrx. C DOUBLE PRECISION RYACOF(0:45450) DOUBLE PRECISION DLAMDA(5), TEST1,TEST2,TEST3 DOUBLE PRECISION RYACOF, G2, G3, G2SUM, G3SUM DOUBLE PRECISION ZL, COEF, XL, XLP1 INTEGER J, ISTEP, IQ, MMIN, MMAX, M, NM, MAXS CHARACTER*4 ID DATA DLAMDA/1.0D0,0.25D0,0.1D0,2.0D0,4.0D0/ C WRITE(6,200) 200 FORMAT(1X,'TESTING ASYMPTOTIC EXPRESSIONS FOR COEFFICIENTS OF YA') OPEN(1,FILE='rya300.dat',STATUS='OLD') READ(1,10)ID,MAXS 10 FORMAT(A4,I5) IF(ID.NE.' RYA') THEN WRITE(*,20) 20 FORMAT(1X,'WRONG COEFFICIENTS FOR RYA') STOP ENDIF READ(1,2000)RYACOF 2000 FORMAT(D22.16) CLOSE(1) DO 50 J=1,5 WRITE(6,1000)DLAMDA(J) 1000 FORMAT(/1X,'LAMBDA =',F8.3) WRITE(6,100) 100 FORMAT(/2X,'M',6X,'COEF',6X,'T1=M*COEF',5X,'2*G2',3X, & 'T2=(M+2)*(T1-2*G2)',2X,'T2+4*G3') C C The Gx are the functions g from Jeffrey & Onishi equn 4.16. IF(DLAMDA(J) .LE. 1) THEN XL=DLAMDA(J) XLP1=XL+1D0 G2=4D0*(2D0*XL+XL**2D0+2D0*XL**3D0)/(15D0*XLP1**3D0) G3=2D0*(16D0-45D0*XL+58D0*XL**2D0-45D0*XL**3D0+16D0*XL**4D0) & /(375D0*XLP1**3D0) ISTEP=1 ELSE XL=1.0D0/DLAMDA(J) XLP1=XL+1D0 G2=4D0*(2D0+XL+2D0*XL**2D0)/(15D0*XLP1**3D0) G3=2D0*(16D0-45D0*XL+58D0*XL**2D0-45D0*XL**3D0+16D0*XL**4D0) & /(375D0*XL*XLP1**3D0) ISTEP=-1 ENDIF MMIN=150 MMAX=300 G2SUM=2D0*G2 G3SUM=4D0*G3 DO 900 M=MMIN,MMAX IF (ISTEP .GT. 0) THEN NM = (M*(M+1))/2 ELSE NM = (M*(M+1))/2 +M ENDIF ZL=XLP1**(-M) COEF=0D0 C Some computers may underflow in the next loop. DO 950 IQ=0,M COEF=COEF+RYACOF(NM)*ZL NM=NM+ISTEP ZL=ZL*XL 950 CONTINUE TEST1=DBLE(M)*COEF TEST2=DBLE(M+2)*(TEST1-G2SUM) TEST3=TEST2+G3SUM WRITE(6,60) M,COEF,TEST1,G2SUM,TEST2,TEST3 60 FORMAT(1X,I3,3D13.5,2D13.5) 900 CONTINUE 50 CONTINUE STOP END