2 SUBROUTINE ZACAI
(ZR
, ZI
, FNU
, KODE
, MR
, N
, YR
, YI
, NZ
, RL
, TOL
,
4 C***BEGIN PROLOGUE ZACAI
6 C***PURPOSE Subsidiary to ZAIRY
8 C***TYPE ALL (CACAI-A, ZACAI-A)
9 C***AUTHOR Amos, D. E., (SNL)
12 C ZACAI APPLIES THE ANALYTIC CONTINUATION FORMULA
14 C K(FNU,ZN*EXP(MP))=K(FNU,ZN)*EXP(-MP*FNU) - MP*I(FNU,ZN)
15 C MP=PI*MR*CMPLX(0.0,1.0)
17 C TO CONTINUE THE K FUNCTION FROM THE RIGHT HALF TO THE LEFT
18 C HALF Z PLANE FOR USE WITH ZAIRY WHERE FNU=1/3 OR 2/3 AND N=1.
19 C ZACAI IS THE SAME AS ZACON WITH THE PARTS FOR LARGER ORDERS AND
20 C RECURRENCE REMOVED. A RECURSIVE CALL TO ZACON CAN RESULT IF ZACON
21 C IS CALLED FROM ZAIRY.
24 C***ROUTINES CALLED D1MACH, ZABS, ZASYI, ZBKNU, ZMLRI, ZS1S2, ZSERI
25 C***REVISION HISTORY (YYMMDD)
27 C 910415 Prologue converted to Version 4.0 format. (BAB)
28 C***END PROLOGUE ZACAI
29 C COMPLEX CSGN,CSPN,C1,C2,Y,Z,ZN,CY
30 DOUBLE PRECISION ALIM
, ARG
, ASCLE
, AZ
, CSGNR
, CSGNI
, CSPNR
,
31 * CSPNI
, C1R
, C1I
, C2R
, C2I
, CYR
, CYI
, DFNU
, ELIM
, FMR
, FNU
, PI
,
32 * RL
, SGN
, TOL
, YY
, YR
, YI
, ZR
, ZI
, ZNR
, ZNI
, D1MACH
, ZABS
33 INTEGER INU
, IUF
, KODE
, MR
, N
, NN
, NW
, NZ
34 DIMENSION YR
(N
), YI
(N
), CYR
(2), CYI
(2)
36 DATA PI
/ 3.14159265358979324D0
/
37 C***FIRST EXECUTABLE STATEMENT ZACAI
44 IF (AZ
.LE
.2.0D0
) GO TO 10
45 IF (AZ*AZ*0
.25D0
.GT
.DFNU
+1.0D0
) GO TO 20
47 C-----------------------------------------------------------------------
48 C POWER SERIES FOR THE I FUNCTION
49 C-----------------------------------------------------------------------
50 CALL ZSERI
(ZNR
, ZNI
, FNU
, KODE
, NN
, YR
, YI
, NW
, TOL
, ELIM
, ALIM
)
53 IF (AZ
.LT
.RL
) GO TO 30
54 C-----------------------------------------------------------------------
55 C ASYMPTOTIC EXPANSION FOR LARGE Z FOR THE I FUNCTION
56 C-----------------------------------------------------------------------
57 CALL ZASYI
(ZNR
, ZNI
, FNU
, KODE
, NN
, YR
, YI
, NW
, RL
, TOL
, ELIM
,
62 C-----------------------------------------------------------------------
63 C MILLER ALGORITHM NORMALIZED BY THE SERIES FOR THE I FUNCTION
64 C-----------------------------------------------------------------------
65 CALL ZMLRI
(ZNR
, ZNI
, FNU
, KODE
, NN
, YR
, YI
, NW
, TOL
)
68 C-----------------------------------------------------------------------
69 C ANALYTIC CONTINUATION TO THE LEFT HALF PLANE FOR THE K FUNCTION
70 C-----------------------------------------------------------------------
71 CALL ZBKNU
(ZNR
, ZNI
, FNU
, KODE
, 1, CYR
, CYI
, NW
, TOL
, ELIM
, ALIM
)
77 IF (KODE
.EQ
.1) GO TO 50
79 CSGNR
= -CSGNI*SIN
(YY
)
82 C-----------------------------------------------------------------------
83 C CALCULATE CSPN=EXP(FNU*PI*I) TO MINIMIZE LOSSES OF SIGNIFICANCE
85 C-----------------------------------------------------------------------
90 IF (MOD
(INU
,2).EQ
.0) GO TO 60
98 IF (KODE
.EQ
.1) GO TO 70
100 ASCLE
= 1.0D
+3*D1MACH
(1)/TOL
101 CALL ZS1S2
(ZNR
, ZNI
, C1R
, C1I
, C2R
, C2I
, NW
, ASCLE
, ALIM
, IUF
)
104 YR
(1) = CSPNR*C1R
- CSPNI*C1I
+ CSGNR*C2R
- CSGNI*C2I
105 YI
(1) = CSPNR*C1I
+ CSPNI*C1R
+ CSGNR*C2I
+ CSGNI*C2R