PROGRAM RYC DEM C This program demonstrates the use of the coefficients calculated C by the programs trnrox. The program will produce a table of values C for different values of lambda and s as set in the DATA statements. C DOUBLE PRECISION DLAMDA(5),RYCCOF(0:45450) INTEGER J,IBETA DOUBLE PRECISION XL,XLP1,G2,G3,G2SUM,G3SUM DOUBLE PRECISION ZL,COEF,TEST1,TEST2,TEST3 INTEGER I,K,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 YC') OPEN(4,FILE='ryc300.dat',STATUS='OLD') READ(4,10)ID,MAXS 10 FORMAT(A4,I5) IF(ID.NE.' RYC') THEN WRITE(*,20) 20 FORMAT(1X,'WRONG COEFFICIENTS FOR RYC') STOP ENDIF READ(4,2000)RYCCOF 2000 FORMAT(D22.16) CLOSE(4) DO 50 J=1,5 DO 50 IBETA=1,2 IF(IBETA.EQ.1) THEN WRITE(6,1000)DLAMDA(J) 1000 FORMAT(/1X,'LAMBDA =',F8.3) WRITE(6,90) 90 FORMAT(/1X,'VALUES OF EVEN TERMS IN SERIES') WRITE(6,120) 120 FORMAT(/2X,'M',6X,'COEF',5X,'T1=M*COEF',5X,'2*G2',3X, & 'T2=(M+2)(T1-2*G2)',2X,'T2+4*G3') ELSE WRITE(6,110) 110 FORMAT(/1X,'VALUES OF ODD TERMS IN SERIES') WRITE(6,120) ENDIF IF(DLAMDA(J).GT.1D0) THEN I=2 K=3-IBETA XL=1D0/DLAMDA(J) ELSE I=1 K=IBETA XL=DLAMDA(J) ENDIF XLP1=XL+1D0 IF(I.EQ.K) THEN IF(I.EQ.1) THEN G2=2D0*XL/(5D0*XLP1) G3=(8D0+6D0*XL+33D0*XL**2)/(125D0*XLP1) ISTEP=1 ELSE G2=2D0/(5D0*XLP1) G3=(33D0+6D0*XL+8D0*XL**2)/(125D0*XL*XLP1) ISTEP=-1 ENDIF C Notice that because the first coef is a signature we supply the 1. MMIN=150 MMAX=300 ELSE IF(I.EQ.1) THEN C These factors are (XLP1**3)/8 times g<4> and g<5> in the paper. C The g<5> seems to have a misprint of 4 instead of 2. G2=1D0*XL**2/(10D0*XLP1) G3=(43D0*XL-24D0*XL**2+43D0*XL**3)/(500D0*XLP1) ELSE G2=1D0/(10D0*XL*XLP1) G3=(43D0-24D0*XL+43D0*XL**2)/(500D0*XL**2*XLP1) ENDIF MMIN=149 MMAX=299 ENDIF G2SUM=2D0*G2 G3SUM=4D0*G3 DO 100 M=MMIN,MMAX,2 IF (ISTEP.GT.0) THEN NM = (M*(M+1))/2 ELSE NM = (M*(M+1))/2 +M ENDIF ZL=XLP1**(-M) COEF=0D0 DO 60 IQ=0,M COEF=COEF+RYCCOF(NM)*ZL NM=NM+ISTEP ZL=ZL*XL 60 CONTINUE TEST1=DBLE(M)*COEF TEST2=DBLE(M+2)*(TEST1-G2SUM) TEST3=TEST2+G3SUM WRITE(6,70) M,COEF,TEST1,G2SUM,TEST2,TEST3 70 FORMAT(1X,I3,3D12.5,2D13.5) 100 CONTINUE 50 CONTINUE STOP END