1 SUBROUTINE cairy(Z, ID, KODE, AI, NZ, IERR)
128 COMPLEX AI, CONE, CSQ, CY, S1, S2, TRM1, TRM2, Z, ZTA, Z3
129 REAL AA, AD, AK, ALIM, ATRM, AZ, AZ3, BK, CK, COEF, C1, C2, DIG,
130 * DK, D1, D2, ELIM, FID, FNU, RL, R1M5, SFAC, TOL, TTH, ZI, ZR,
131 * Z3I, Z3R, R1MACH, BB, ALAZ
132 INTEGER ID, IERR, IFLAG, K, KODE, K1, K2, MR, NN, NZ, I1MACH
134 DATA tth, c1, c2, coef /6.66666666666666667e-01,
135 * 3.55028053887817240e-01,2.58819403792806799e-01,
136 * 1.83776298473930683e-01/
137 DATA cone / (1.0e0,0.0e0) /
141 IF (id.LT.0 .OR. id.GT.1) ierr=1
142 IF (kode.LT.1 .OR. kode.GT.2) ierr=1
143 IF (ierr.NE.0)
RETURN
145 tol = amax1(r1mach(4),1.0e-18)
147 IF (az.GT.1.0e0)
GO TO 60
153 IF (az.LT.tol)
GO TO 160
155 IF (aa.LT.tol/az)
GO TO 40
162 bk = 3.0e0 - fid - fid
164 dk = 3.0e0 + fid + fid
168 ak = 24.0e0 + 9.0e0*fid
169 bk = 30.0e0 - 9.0e0*fid
173 trm1 = trm1*
cmplx(z3r/d1,z3i/d1)
175 trm2 = trm2*
cmplx(z3r/d2,z3i/d2)
181 IF (atrm.LT.tol*ad)
GO TO 40
186 IF (id.EQ.1)
GO TO 50
187 ai = s1*
cmplx(c1,0.0e0) - z*s2*
cmplx(c2,0.0e0)
188 IF (kode.EQ.1)
RETURN
189 zta = z*csqrt(z)*
cmplx(tth,0.0e0)
193 ai = -s2*
cmplx(c2,0.0e0)
194 IF (az.GT.tol) ai = ai + z*z*s1*
cmplx(c1/(1.0e0+fid),0.0e0)
195 IF (kode.EQ.1)
RETURN
196 zta = z*csqrt(z)*
cmplx(tth,0.0e0)
203 fnu = (1.0e0+fid)/3.0e0
217 k = min0(iabs(k1),iabs(k2))
218 elim = 2.303e0*(float(k)*r1m5-3.0e0)
221 dig = amin1(aa,18.0e0)
223 alim = elim + amax1(-aa,-41.45e0)
224 rl = 1.2e0*dig + 3.0e0
230 bb=float(i1mach(9))*0.5e0
233 IF (az.GT.aa)
GO TO 260
237 zta=z*csq*
cmplx(tth,0.0e0)
246 IF (zr.GE.0.0e0)
GO TO 70
251 IF (zi.NE.0.0e0)
GO TO 80
252 IF (zr.GT.0.0e0)
GO TO 80
253 zta =
cmplx(0.0e0,ak)
256 IF (aa.GE.0.0e0 .AND. zr.GT.0.0e0)
GO TO 100
257 IF (kode.EQ.2)
GO TO 90
261 IF (aa.GT.(-alim))
GO TO 90
262 aa = -aa + 0.25e0*alaz
265 IF (aa.GT.elim)
GO TO 240
271 IF (zi.LT.0.0e0) mr = -1
272 CALL cacai(zta, fnu, kode, mr, 1, cy, nn, rl, tol, elim, alim)
273 IF (nn.LT.0)
GO TO 250
277 IF (kode.EQ.2)
GO TO 110
281 IF (aa.LT.alim)
GO TO 110
282 aa = -aa - 0.25e0*alaz
285 IF (aa.LT.(-elim))
GO TO 180
287 CALL cbknu(zta, fnu, kode, 1, cy, nz, tol, elim, alim)
289 s1 = cy(1)*
cmplx(coef,0.0e0)
290 IF (iflag.NE.0)
GO TO 140
291 IF (id.EQ.1)
GO TO 130
297 s1 = s1*
cmplx(sfac,0.0e0)
298 IF (id.EQ.1)
GO TO 150
300 ai = s1*
cmplx(1.0e0/sfac,0.0e0)
304 ai = s1*
cmplx(1.0e0/sfac,0.0e0)
307 aa = 1.0e+3*r1mach(1)
308 s1 =
cmplx(0.0e0,0.0e0)
309 IF (id.EQ.1)
GO TO 170
310 IF (az.GT.aa) s1 =
cmplx(c2,0.0e0)*z
311 ai =
cmplx(c1,0.0e0) - s1
314 ai = -
cmplx(c2,0.0e0)
316 IF (az.GT.aa) s1 = z*z*
cmplx(0.5e0,0.0e0)
317 ai = ai + s1*
cmplx(c1,0.0e0)
321 ai =
cmplx(0.0e0,0.0e0)
328 IF(nn.EQ.(-1))
GO TO 240
subroutine cacai(Z, FNU, KODE, MR, N, Y, NZ, RL, TOL, ELIM, ALIM)
subroutine cairy(Z, ID, KODE, AI, NZ, IERR)
subroutine cbknu(Z, FNU, KODE, N, Y, NZ, TOL, ELIM, ALIM)
ColumnVector real(const ComplexColumnVector &a)