1 SUBROUTINE zuni2(ZR, ZI, FNU, KODE, N, YR, YI, NZ, NLAST, FNUL,
20 DOUBLE PRECISION AARG, AIC, AII, AIR, ALIM, ANG, APHI, ARGI,
21 * argr, ascle, asumi, asumr, bry, bsumi, bsumr, cidi, cipi, cipr,
22 * coner, crsc, cscl, csrr, cssr, c1r, c2i, c2m, c2r, daii,
23 * dair, elim, fn, fnu, fnul, hpi, phii, phir, rast, raz, rs1, rzi,
24 * rzr, sti, str, s1i, s1r, s2i, s2r, tol, yi, yr, zbi, zbr, zeroi,
25 * zeror, zeta1i, zeta1r, zeta2i, zeta2r, zi, zni, znr, zr, cyr,
27 INTEGER I, IFLAG, IN, INU, J, K, KODE, N, NAI, ND, NDAI, NLAST,
28 * nn, nuf, nw, nz, idum
29 dimension bry(3), yr(n), yi(n), cipr(4), cipi(4), cssr(3),
30 * csrr(3), cyr(2), cyi(2)
31 DATA zeror,zeroi,coner / 0.0d0, 0.0d0, 1.0d0 /
32 DATA cipr(1),cipi(1),cipr(2),cipi(2),cipr(3),cipi(3),cipr(4),
33 * cipi(4)/ 1.0d0,0.0d0, 0.0d0,1.0d0, -1.0d0,0.0d0, 0.0d0,-1.0d0/
35 1 1.57079632679489662d+00, 1.265512123484645396d+00/
53 bry(1) = 1.0d+3*
d1mach(1)/tol
63 ang = hpi*(fnu-dble(float(inu)))
70 str = c2r*cipr(in) - c2i*cipi(in)
71 c2i = c2r*cipi(in) + c2i*cipr(in)
73 IF (zi.GT.0.0d0)
GO TO 10
83 CALL zunhj(znr, zni, fn, 1, tol, phir, phii, argr, argi, zeta1r,
84 * zeta1i, zeta2r, zeta2i, asumr, asumi, bsumr, bsumi)
85 IF (kode.EQ.1)
GO TO 20
88 rast = fn/
xzabs(str,sti)
95 s1r = -zeta1r + zeta2r
96 s1i = -zeta1i + zeta2i
99 IF (dabs(rs1).GT.elim)
GO TO 150
103 fn = fnu + dble(float(nd-i))
104 CALL zunhj(znr, zni, fn, 0, tol, phir, phii, argr, argi,
105 * zeta1r, zeta1i, zeta2r, zeta2i, asumr, asumi, bsumr, bsumi)
106 IF (kode.EQ.1)
GO TO 50
109 rast = fn/
xzabs(str,sti)
113 s1i = -zeta1i + sti + dabs(zi)
116 s1r = -zeta1r + zeta2r
117 s1i = -zeta1i + zeta2i
123 IF (dabs(rs1).GT.elim)
GO TO 120
124 IF (i.EQ.1) iflag = 2
125 IF (dabs(rs1).LT.alim)
GO TO 70
130 aphi =
xzabs(phir,phii)
131 aarg =
xzabs(argr,argi)
132 rs1 = rs1 + dlog(aphi) - 0.25d0*dlog(aarg) - aic
133 IF (dabs(rs1).GT.elim)
GO TO 120
134 IF (i.EQ.1) iflag = 1
135 IF (rs1.LT.0.0d0)
GO TO 70
136 IF (i.EQ.1) iflag = 3
142 CALL zairy(argr, argi, 0, 2, air, aii, nai, idum)
143 CALL zairy(argr, argi, 1, 2, dair, daii, ndai, idum)
144 str = dair*bsumr - daii*bsumi
145 sti = dair*bsumi + daii*bsumr
146 str = str + (air*asumr-aii*asumi)
147 sti = sti + (air*asumi+aii*asumr)
148 s2r = phir*str - phii*sti
149 s2i = phir*sti + phii*str
150 str = dexp(s1r)*cssr(iflag)
153 str = s2r*s1r - s2i*s1i
154 s2i = s2r*s1i + s2i*s1r
156 IF (iflag.NE.1)
GO TO 80
157 CALL zuchk(s2r, s2i, nw, bry(1), tol)
158 IF (nw.NE.0)
GO TO 120
160 IF (zi.LE.0.0d0) s2i = -s2i
161 str = s2r*c2r - s2i*c2i
162 s2i = s2r*c2i + s2i*c2r
167 yr(j) = s2r*csrr(iflag)
168 yi(j) = s2i*csrr(iflag)
173 IF (nd.LE.2)
GO TO 110
174 raz = 1.0d0/
xzabs(zr,zi)
179 bry(2) = 1.0d0/bry(1)
192 s2r = s1r + (fnu+fn)*(rzr*c2r-rzi*c2i)
193 s2i = s1i + (fnu+fn)*(rzr*c2i+rzi*c2r)
202 IF (iflag.GE.3)
GO TO 100
206 IF (c2m.LE.ascle)
GO TO 100
213 s1r = s1r*cssr(iflag)
214 s1i = s1i*cssr(iflag)
215 s2r = s2r*cssr(iflag)
216 s2i = s2i*cssr(iflag)
222 IF (rs1.GT.0.0d0)
GO TO 140
230 IF (nd.EQ.0)
GO TO 110
231 CALL zuoik(zr, zi, fnu, kode, 1, nd, yr, yi, nuf, tol, elim, alim)
232 IF (nuf.LT.0)
GO TO 140
235 IF (nd.EQ.0)
GO TO 110
236 fn = fnu + dble(float(nd-1))
237 IF (fn.LT.fnul)
GO TO 130
249 c2r = car*cipr(in) - sar*cipi(in)
250 c2i = car*cipi(in) + sar*cipr(in)
251 IF (zi.LE.0.0d0) c2i = -c2i
260 IF (rs1.GT.0.0d0)
GO TO 140
double precision function d1mach(i)
octave_int< T > mod(const octave_int< T > &x, const octave_int< T > &y)
double precision function xzabs(ZR, ZI)
subroutine zairy(ZR, ZI, ID, KODE, AIR, AII, NZ, IERR)
subroutine zuchk(YR, YI, NZ, ASCLE, TOL)
subroutine zunhj(ZR, ZI, FNU, IPMTR, TOL, PHIR, PHII, ARGR, ARGI, ZETA1R, ZETA1I, ZETA2R, ZETA2I, ASUMR, ASUMI, BSUMR, BSUMI)
subroutine zuni2(ZR, ZI, FNU, KODE, N, YR, YI, NZ, NLAST, FNUL, TOL, ELIM, ALIM)
subroutine zuoik(ZR, ZI, FNU, KODE, IKFLG, N, YR, YI, NUF, TOL, ELIM, ALIM)