Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  JPEX
Language: FORTRAN
Code:
PROGRAM ASAP 

      REAL*8 V, W, AB, T3, T4, T5, CF, T6, T7, T8, 
     1T9 
      REAL*8 D, X, Y, YA, TH, EX, E, XI, YS, T10 
      COMPLEX*16 EC,E15,S,T,UC,VC,V1,V2,W12,Z 
      DIMENSION V(21), W(21), D(16), E(16) 
      DATA V/0.22284667E00,0.11889321E01, 
     10.29927363E01,0.57751436E01,0.98374674E01, 
     20.15982874E02,0.93307812E-01,0.49269174E00, 
     30.12155954E01,0.22699495E01,0.36676227E01, 
     40.54253366E01,0.75659162E01,0.10120228E02,  
     50.13130282E02,0.16654408E02,0.20776479E02,  
     60.25623894E02,0.31407519E02,0.38530683E02, 
     70.48026086E02/ 
      DATA W/0.45896460E00,0.41700083E00,  
     10.11337338E00,0.10399197E-01,0.26101720E-03, 
     20.89854791E-06,0.21823487E00,0.34221017E00, 
     30.26302758E00,0.12642582E00,0.40206865E-01, 
     40.85638778E-02,0.12124361E-02,0.11167440E-03,
     50.64599267E-05,0.22263169E-06,0.42274304E-08,
     60.39218973E-10,0.14565152E-12,0.14830270E-15,
     70.16005949E-19/ 
      DATA D/0.22495842E02,0.74411568E02,
     1-0.41431576E03,-0.78754339E02,0.11254744E02,
     20.16021761E03,-0.23862195E03,-0.50094687E03,
     3-0.68487854E02,0.12254778E02,-0.10161976E02,
     4-0.47219591E01,0.79729681E01,-0.21069574E02,
     50.22046490E01,0.89728244E01/ 
      DATA E/0.21103107E02,-0.37959787E03,
     1-0.97489220E02,0.12900672E03,0.17949226E02,
     2-0.12910931E03,-0.55705574E03,0.13524801E02,
     30.14696721E03,0.17949528E02,-0.32981014E00,
     40.31028836E02,0.81657657E01,0.22236961E02,
     50.39124892E02, 0.81636799E01/ 

      V1 = CMPLEX(-1.8366e+03, 3.3401e+02) 
      V2 = CMPLEX(-1.8366e+03, 6.2739e-01) 
      Z = V1 

      print *, V1 

      DO 12 JIM=1,2 
      X = DBLE(Z) 
      Y = DIMAG(Z) 
      E15 = (0.0,0.0) 
COMPLEX 
      AB = CDABS(Z) 
      IF (AB.EQ.0.) GO TO 11 
      IF (X.GE.0..AND.AB.GT.10.) GO TO 10 
      YA = ABS(Y) 
      IF (X.LE.0..AND.YA.GT.10.) GO TO 10 
      IF (YA-X.GE.17.5.OR.YA.GE.6.5.OR.X+YA.GE.5.5.OR.X.GE.3.) GO TO 2 
      IF (X.LE.-9.) GO TO 6 
      IF (YA-X.GE.2.5) GO TO 7 
      IF (X+YA.GE.1.5) GO TO 3 
      N = 6.+3.*AB 
      E15 = 1./(N-1.)-Z/N**2 
    1 N = N-1 
      E15 = 1./(N-1.)-Z*E15/N 
      IF (N.GE.3) GO TO 1 
      E15 = Z*E15-CMPLX(0.577216+DLOG(AB),ATAN2(Y,X)) 
      GO TO 11 
    2 J1 = 1 
      J2 = 6 
      GO TO 4 
    3 J1 = 7 
      J2 = 21 
    4 S = (.0,.0) 
      YS = Y*Y 

      DO 5 I=J1,J2 
      XI = V(I)+X 
      CF = W(I)/(XI*XI+YS) 
    5 S = S+CMPLX(XI*CF,-YA*CF) 

      GO TO 9 
    6 T3 = X*X-Y*Y 
      T4 = 2.*X*YA 
      T5 = X*T3-YA*T4 
      T6 = X*T4+YA*T3 
      UC = CMPLX(D(11)+D(12)*X+D(13)*T3+T5-E(12)*YA-E(13)*T4,E(11)+E(12) 
     1*X+E(13)*T3+T6+D(12)*YA+D(13)*T4) 
      VC = CMPLX(D(14)+D(15)*X+D(16)*T3+T5-E(15)*YA-E(16)*T4,E(14)+E(15) 
     1*X+E(16)*T3+T6+D(15)*YA+D(16)*T4) 
      GO TO 8 
    7 T3 = X*X-Y*Y 
      T4 = 2.*X*YA 
      T5 = X*T3-YA*T4 
      T6 = X*T4+YA*T3 
      T7 = X*T5-YA*T6 
      T8 = X*T6+YA*T5 
      T9 = X*T7-YA*T8 
      T10 = X*T8+YA*T7 
      UC = CMPLX(D(1)+D(2)*X+D(3)*T3+D(4)*T5+D(5)*T7+T9-(E(2)*YA+E(3)*T4
     1+E(4)*T6+E(5)*T8),E(1)+E(2)*X+E(3)*T3+E(4)*T5+E(5)*T7+T10+(D(2)*YA 
     2+D(3)*T4+D(4)*T6+D(5)*T8)) 
      VC = CMPLX(D(6)+D(7)*X+D(8)*T3+D(9)*T5+D(10)*T7+T9-(E(7)*YA+E(8)*T
     14+E(9)*T6+E(10)*T8),E(6)+E(7)*X+E(8)*T3+E(9)*T5+E(10)*T7+T10+(D(7) 
     2*YA+D(8)*T4+D(9)*T6+D(10)*T8)) 
    8 EC = UC/VC 
      S = EC/CMPLX(X,YA) 
    9 EX = EXP(-X) 
      T = EX*CMPLX(COS(YA),-SIN(YA)) 
      E15 = S*T 
      IF (Y.LT.0.) E15 = CONJG(E15) 
      GO TO 11 
   10 E15 = .409319/(Z+.193044)+.421831/(Z+1.02666)+.147126/(Z+2.56788)+ 
     1.206335E-1/(Z+4.90035)+.107401E-2/(Z+8.18215)+.158654E-4/(Z+12.734 
     22)+.317031E-7/(Z+19.3957) 
      E15 = E15*CDEXP(-Z) 
   11 IF (JIM.EQ.1) W12 = E15 
   12 Z = V2 

      Z = V2/V1 

      TH = DATAN2(DIMAG(Z),DBLE(Z))-DATAN2(DIMAG(V2),DBLE(V2)) + 
     1 DATAN2(DIMAG(V1),DBLE(V1)) 
      AB = ABS(TH) 
      IF (AB.LT.1.) TH = .0 
      IF (TH.GT.1.) TH = 6.2831853 
      IF (TH.LT.-1.) TH = -6.2831853 


      W12 = W12-E15+DCMPLX(DBLE(0.0),DBLE(TH)) 
      PRINT *, "hello" 


      END PROGRAM ASAP      
Comments: