1 SUBROUTINE cbesy(Z, FNU, KODE, N, CY, NZ, CWRK, IERR)
144 COMPLEX cwrk, cy,
c1, c2, ex, hci, z, zu, zv
145 REAL elim, ey, fnu,
r1,
r2, tay, xx, yy,
r1mach, ascle, rtol,
147 INTEGER i,
ierr, k, kode, k1, k2, n, nz, nz1, nz2,
i1mach
154 IF (xx.EQ.0.0e0 .AND. yy.EQ.0.0e0)
ierr=1
155 IF (fnu.LT.0.0e0)
ierr=1
156 IF (kode.LT.1 .OR. kode.GT.2)
ierr=1
158 IF (
ierr.NE.0)
RETURN
159 hci =
cmplx(0.0e0,0.5e0)
160 CALL
cbesh(z, fnu, kode, 1, n, cy, nz1,
ierr)
161 IF (
ierr.NE.0.AND.
ierr.NE.3) go to 170
162 CALL
cbesh(z, fnu, kode, 2, n, cwrk, nz2,
ierr)
163 IF (
ierr.NE.0.AND.
ierr.NE.3) go to 170
165 IF (kode.EQ.2) go to 60
167 cy(i) = hci*(cwrk(i)-cy(i))
171 tol = amax1(
r1mach(4),1.0e-18)
174 k = min0(iabs(k1),iabs(k2))
179 elim = 2.303e0*(float(k)*r1m5-3.0e0)
185 IF (tay.LT.elim) ey =
exp(-tay)
186 IF (yy.LT.0.0e0) go to 90
192 ascle =
r1mach(1)*rtol*1.0e+3
199 IF (amax1(
abs(aa),
abs(bb)).GT.ascle) go to 75
200 zv = zv*
cmplx(rtol,0.0e0)
204 zv = zv*
cmplx(atol,0.0e0)
209 IF (amax1(
abs(aa),
abs(bb)).GT.ascle) go to 85
210 zu = zu*
cmplx(rtol,0.0e0)
214 zu = zu*
cmplx(atol,0.0e0)
216 IF (cy(i).EQ.
cmplx(0.0e0,0.0e0) .AND. ey.EQ.0.0e0) nz = nz + 1
221 c2 = conjg(ex)*
cmplx(ey,0.0e0)