1 SUBROUTINE cunk1(Z, FNU, KODE, MR, N, Y, NZ, TOL, ELIM, ALIM)
13 COMPLEX CFN, CK, CONE, CRSC, CS, CSCL, CSGN, CSPN, CSR, CSS,
14 * CWRK, CY, CZERO, C1, C2, PHI, RZ, SUM, S1, S2, Y, Z,
15 * ZETA1, ZETA2, ZR, PHID, ZETA1D, ZETA2D, SUMD
16 REAL ALIM, ANG, APHI, ASC, ASCLE, BRY, CPN, C2I, C2M, C2R, ELIM,
17 * FMR, FN, FNF, FNU, PI, RS1, SGN, SPN, TOL, X, R1MACH
18 INTEGER I, IB, IFLAG, IFN, IL, INIT, INU, IUF, K, KDFLG, KFLAG,
19 * KK, KODE, MR, N, NW, NZ, J, IPARD, INITD, IC
20 dimension bry(3), init(2), y(n), sum(2), phi(2), zeta1(2),
21 * zeta2(2), cy(2), cwrk(16,3), css(3), csr(3)
22 DATA czero, cone / (0.0e0,0.0e0) , (1.0e0,0.0e0) /
23 DATA pi / 3.14159265358979324e0 /
31 cscl =
cmplx(1.0e0/tol,0.0e0)
32 crsc =
cmplx(tol,0.0e0)
39 bry(1) = 1.0e+3*r1mach(1)/tol
44 IF (x.LT.0.0e0) zr = -z
53 CALL cunik(zr, fn, 2, 0, tol, init(j), phi(j), zeta1(j),
54 * zeta2(j), sum(j), cwrk(1,j))
55 IF (kode.EQ.1)
GO TO 20
57 s1 = zeta1(j) - cfn*(cfn/(zr+zeta2(j)))
60 s1 = zeta1(j) - zeta2(j)
66 IF (abs(rs1).GT.elim)
GO TO 60
67 IF (kdflg.EQ.1) kflag = 2
68 IF (abs(rs1).LT.alim)
GO TO 40
73 rs1 = rs1 + alog(aphi)
74 IF (abs(rs1).GT.elim)
GO TO 60
75 IF (kdflg.EQ.1) kflag = 1
76 IF (rs1.LT.0.0e0)
GO TO 40
77 IF (kdflg.EQ.1) kflag = 3
86 c2m = exp(c2r)*
real(css(kflag))
89 IF (kflag.NE.1)
GO TO 50
90 CALL cuchk(s2, nw, bry(1), tol)
95 IF (kdflg.EQ.2)
GO TO 75
99 IF (rs1.GT.0.0e0)
GO TO 290
103 IF (x.LT.0.0e0)
GO TO 290
108 IF (y(i-1).EQ.czero)
GO TO 70
114 rz =
cmplx(2.0e0,0.0e0)/zr
115 ck =
cmplx(fn,0.0e0)*rz
117 IF (n.LT.ib)
GO TO 160
124 IF (mr.NE.0) ipard = 0
126 CALL cunik(zr,fn,2,ipard,tol,initd,phid,zeta1d,zeta2d,sumd,
128 IF (kode.EQ.1)
GO TO 80
130 s1=zeta1d-cfn*(cfn/(zr+zeta2d))
136 IF (abs(rs1).GT.elim)
GO TO 95
137 IF (abs(rs1).LT.alim)
GO TO 100
143 IF (abs(rs1).LT.elim)
GO TO 100
145 IF (rs1.GT.0.0e0)
GO TO 290
149 IF (x.LT.0.0e0)
GO TO 290
170 IF (kflag.GE.3)
GO TO 120
176 IF (c2m.LE.ascle)
GO TO 120
196 csgn =
cmplx(0.0e0,sgn)
198 fnf = fnu - float(inu)
203 cspn =
cmplx(cpn,spn)
204 IF (
mod(ifn,2).EQ.1) cspn = -cspn
212 fn = fnu + float(kk-1)
218 IF (n.GT.2)
GO TO 175
229 IF ((kk.EQ.n).AND.(ib.LT.n))
GO TO 180
230 IF ((kk.EQ.ib).OR.(kk.EQ.ic))
GO TO 170
233 CALL cunik(zr, fn, 1, 0, tol, initd, phid, zeta1d,
234 * zeta2d, sumd, cwrk(1,m))
235 IF (kode.EQ.1)
GO TO 190
236 cfn =
cmplx(fn,0.0e0)
237 s1 = -zeta1d + cfn*(cfn/(zr+zeta2d))
240 s1 = -zeta1d + zeta2d
246 IF (abs(rs1).GT.elim)
GO TO 250
247 IF (kdflg.EQ.1) iflag = 2
248 IF (abs(rs1).LT.alim)
GO TO 210
253 rs1 = rs1 + alog(aphi)
254 IF (abs(rs1).GT.elim)
GO TO 250
255 IF (kdflg.EQ.1) iflag = 1
256 IF (rs1.LT.0.0e0)
GO TO 210
257 IF (kdflg.EQ.1) iflag = 3
262 c2m = exp(c2r)*
real(css(iflag))
263 s1 =
cmplx(c2m,0.0e0)*
cmplx(cos(c2i),sin(c2i))
265 IF (iflag.NE.1)
GO TO 220
266 CALL cuchk(s2, nw, bry(1), tol)
267 IF (nw.NE.0) s2 =
cmplx(0.0e0,0.0e0)
276 IF (kode.EQ.1)
GO TO 240
277 CALL cs1s2(zr, s1, s2, nw, asc, alim, iuf)
283 IF (c2.NE.czero)
GO TO 245
287 IF (kdflg.EQ.2)
GO TO 265
291 IF (rs1.GT.0.0e0)
GO TO 290
311 s2 = s1 +
cmplx(fn+fnf,0.0e0)*rz*s2
317 IF (kode.EQ.1)
GO TO 270
318 CALL cs1s2(zr, c1, c2, nw, asc, alim, iuf)
324 IF (iflag.GE.3)
GO TO 280
330 IF (c2m.LE.ascle)
GO TO 280
subroutine cs1s2(ZR, S1, S2, NZ, ASCLE, ALIM, IUF)
subroutine cuchk(Y, NZ, ASCLE, TOL)
subroutine cunik(ZR, FNU, IKFLG, IPMTR, TOL, INIT, PHI, ZETA1, ZETA2, SUM, CWRK)
subroutine cunk1(Z, FNU, KODE, MR, N, Y, NZ, TOL, ELIM, ALIM)
ColumnVector real(const ComplexColumnVector &a)