GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
cbinu.f
Go to the documentation of this file.
1  SUBROUTINE cbinu(Z, FNU, KODE, N, CY, NZ, RL, FNUL, TOL, ELIM,
2  * ALIM)
3 C***BEGIN PROLOGUE CBINU
4 C***REFER TO CBESH,CBESI,CBESJ,CBESK,CAIRY,CBIRY
5 C
6 C CBINU COMPUTES THE I FUNCTION IN THE RIGHT HALF Z PLANE
7 C
8 C***ROUTINES CALLED CASYI,CBUNI,CMLRI,CSERI,CUOIK,CWRSK
9 C***END PROLOGUE CBINU
10  COMPLEX CW, CY, CZERO, Z
11  REAL ALIM, AZ, DFNU, ELIM, FNU, FNUL, RL, TOL
12  INTEGER I, INW, KODE, N, NLAST, NN, NUI, NW, NZ
13  dimension cy(n), cw(2)
14  DATA czero / (0.0e0,0.0e0) /
15 C
16  nz = 0
17  az = cabs(z)
18  nn = n
19  dfnu = fnu + float(n-1)
20  IF (az.LE.2.0e0) GO TO 10
21  IF (az*az*0.25e0.GT.dfnu+1.0e0) GO TO 20
22  10 CONTINUE
23 C-----------------------------------------------------------------------
24 C POWER SERIES
25 C-----------------------------------------------------------------------
26  CALL cseri(z, fnu, kode, nn, cy, nw, tol, elim, alim)
27  inw = iabs(nw)
28  nz = nz + inw
29  nn = nn - inw
30  IF (nn.EQ.0) RETURN
31  IF (nw.GE.0) GO TO 120
32  dfnu = fnu + float(nn-1)
33  20 CONTINUE
34  IF (az.LT.rl) GO TO 40
35  IF (dfnu.LE.1.0e0) GO TO 30
36  IF (az+az.LT.dfnu*dfnu) GO TO 50
37 C-----------------------------------------------------------------------
38 C ASYMPTOTIC EXPANSION FOR LARGE Z
39 C-----------------------------------------------------------------------
40  30 CONTINUE
41  CALL casyi(z, fnu, kode, nn, cy, nw, rl, tol, elim, alim)
42  IF (nw.LT.0) GO TO 130
43  GO TO 120
44  40 CONTINUE
45  IF (dfnu.LE.1.0e0) GO TO 70
46  50 CONTINUE
47 C-----------------------------------------------------------------------
48 C OVERFLOW AND UNDERFLOW TEST ON I SEQUENCE FOR MILLER ALGORITHM
49 C-----------------------------------------------------------------------
50  CALL cuoik(z, fnu, kode, 1, nn, cy, nw, tol, elim, alim)
51  IF (nw.LT.0) GO TO 130
52  nz = nz + nw
53  nn = nn - nw
54  IF (nn.EQ.0) RETURN
55  dfnu = fnu+float(nn-1)
56  IF (dfnu.GT.fnul) GO TO 110
57  IF (az.GT.fnul) GO TO 110
58  60 CONTINUE
59  IF (az.GT.rl) GO TO 80
60  70 CONTINUE
61 C-----------------------------------------------------------------------
62 C MILLER ALGORITHM NORMALIZED BY THE SERIES
63 C-----------------------------------------------------------------------
64  CALL cmlri(z, fnu, kode, nn, cy, nw, tol)
65  IF(nw.LT.0) GO TO 130
66  GO TO 120
67  80 CONTINUE
68 C-----------------------------------------------------------------------
69 C MILLER ALGORITHM NORMALIZED BY THE WRONSKIAN
70 C-----------------------------------------------------------------------
71 C-----------------------------------------------------------------------
72 C OVERFLOW TEST ON K FUNCTIONS USED IN WRONSKIAN
73 C-----------------------------------------------------------------------
74  CALL cuoik(z, fnu, kode, 2, 2, cw, nw, tol, elim, alim)
75  IF (nw.GE.0) GO TO 100
76  nz = nn
77  DO 90 i=1,nn
78  cy(i) = czero
79  90 CONTINUE
80  RETURN
81  100 CONTINUE
82  IF (nw.GT.0) GO TO 130
83  CALL cwrsk(z, fnu, kode, nn, cy, nw, cw, tol, elim, alim)
84  IF (nw.LT.0) GO TO 130
85  GO TO 120
86  110 CONTINUE
87 C-----------------------------------------------------------------------
88 C INCREMENT FNU+NN-1 UP TO FNUL, COMPUTE AND RECUR BACKWARD
89 C-----------------------------------------------------------------------
90  nui = int(fnul-dfnu) + 1
91  nui = max0(nui,0)
92  CALL cbuni(z, fnu, kode, nn, cy, nw, nui, nlast, fnul, tol, elim,
93  * alim)
94  IF (nw.LT.0) GO TO 130
95  nz = nz + nw
96  IF (nlast.EQ.0) GO TO 120
97  nn = nlast
98  GO TO 60
99  120 CONTINUE
100  RETURN
101  130 CONTINUE
102  nz = -1
103  IF(nw.EQ.(-2)) nz=-2
104  RETURN
105  END
subroutine casyi(Z, FNU, KODE, N, Y, NZ, RL, TOL, ELIM, ALIM)
Definition: casyi.f:2
subroutine cbinu(Z, FNU, KODE, N, CY, NZ, RL, FNUL, TOL, ELIM, ALIM)
Definition: cbinu.f:3
subroutine cbuni(Z, FNU, KODE, N, Y, NZ, NUI, NLAST, FNUL, TOL, ELIM, ALIM)
Definition: cbuni.f:3
subroutine cmlri(Z, FNU, KODE, N, Y, NZ, TOL)
Definition: cmlri.f:2
subroutine cseri(Z, FNU, KODE, N, Y, NZ, TOL, ELIM, ALIM)
Definition: cseri.f:2
subroutine cuoik(Z, FNU, KODE, IKFLG, N, Y, NUF, TOL, ELIM, ALIM)
Definition: cuoik.f:2
subroutine cwrsk(ZR, FNU, KODE, N, Y, NZ, CW, TOL, ELIM, ALIM)
Definition: cwrsk.f:2