PROGRAM RXC TEST C This program tests the coefficients for RXC against the asymptotic C results. DOUBLE PRECISION RXCCOF(0:45450) DOUBLE PRECISION DLAMDA(5) DOUBLE PRECISION RXCCOF,G3SUM,G3 DOUBLE PRECISION TEST1,TEST2,COEF,XL,XLP1,ZL CHARACTER*4 ID INTEGER I,J,K,ISTEP, MMIN,MMAX,M,NM,IQ,IBETA DATA DLAMDA/1.0D0,0.5D0,0.25D0,0.125D0,2.0D0/ WRITE(6,10) 10 FORMAT(1X,'TESTING ASYMPTOTIC EXPRESSIONS FOR COEFFICIENTS OF XC') OPEN(1,FILE='rxc300.dat',STATUS='OLD') READ(1,15) ID,MAXS 15 FORMAT(A4,I5) IF (ID.NE.' RXC') THEN WRITE(6,25) 25 FORMAT(1X,'WRONG COEFFICIENTS FOR RXC') STOP ENDIF READ(1,30)RXCCOF 30 FORMAT(D22.16) CLOSE(1) DO 1200 J=1,5 IBETA=1 WRITE(6,1000)DLAMDA(J) 1000 FORMAT(/1X,'LAMBDA =',F8.3) WRITE(6,1100) 1100 FORMAT(/2X,'M',5X,'COEF',9X,'T1=M*COEF',5X, & 'T2=(M+2)(T1)',8X,'4*G3') 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.1) THEN G3=-XL*XL/(4D0*XLP1) ISTEP=1 ELSE G3=-1D0/(4D0*XL*XLP1) ISTEP=-1 ENDIF MMIN=150 MMAX=300 G3SUM=4D0*G3 DO 1200 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 DO 50 IQ=0,M COEF=COEF+RXCCOF(NM)*ZL NM=NM+ISTEP ZL=ZL*XL 50 CONTINUE 100 CONTINUE TEST1=DBLE(M)*(COEF) TEST2=DBLE(M+2)*(TEST1) WRITE(6,60) M,COEF,TEST1,TEST2,G3SUM 60 FORMAT(1X,I3,2D13.4,2D15.4) 1200 CONTINUE STOP END