1 SUBROUTINE ZBUNI
(ZR
, ZI
, FNU
, KODE
, N
, YR
, YI
, NZ
, NUI
, NLAST
,
2 * FNUL
, TOL
, ELIM
, ALIM
)
3 C***BEGIN PROLOGUE ZBUNI
4 C***REFER TO ZBESI,ZBESK
6 C ZBUNI COMPUTES THE I BESSEL FUNCTION FOR LARGE CABS(Z).GT.
7 C FNUL AND FNU+N-1.LT.FNUL. THE ORDER IS INCREASED FROM
8 C FNU+N-1 GREATER THAN FNUL BY ADDING NUI AND COMPUTING
9 C ACCORDING TO THE UNIFORM ASYMPTOTIC EXPANSION FOR I(FNU,Z)
10 C ON IFORM=1 AND THE EXPANSION FOR J(FNU,Z) ON IFORM=2
12 C***ROUTINES CALLED ZUNI1,ZUNI2,AZABS,D1MACH
13 C***END PROLOGUE ZBUNI
14 C COMPLEX CSCL,CSCR,CY,RZ,ST,S1,S2,Y,Z
15 DOUBLE PRECISION ALIM
, AX
, AY
, CSCLR
, CSCRR
, CYI
, CYR
, DFNU
,
16 * ELIM
, FNU
, FNUI
, FNUL
, GNU
, RAZ
, RZI
, RZR
, STI
, STR
, S1I
, S1R
,
17 * S2I
, S2R
, TOL
, YI
, YR
, ZI
, ZR
, AZABS
, ASCLE
, BRY
, C1R
, C1I
, C1M
,
19 INTEGER I
, IFLAG
, IFORM
, K
, KODE
, N
, NL
, NLAST
, NUI
, NW
, NZ
20 DIMENSION YR
(N
), YI
(N
), CYR
(2), CYI
(2), BRY
(3)
22 AX
= DABS
(ZR
)*1.7321D0
25 IF (AY
.GT
.AX
) IFORM
= 2
26 IF (NUI
.EQ
.0) GO TO 60
27 FNUI
= DBLE
(FLOAT
(NUI
))
28 DFNU
= FNU
+ DBLE
(FLOAT
(N
-1))
30 IF (IFORM
.EQ
.2) GO TO 10
31 C-----------------------------------------------------------------------
32 C ASYMPTOTIC EXPANSION FOR I(FNU,Z) FOR LARGE FNU APPLIED IN
33 C -PI/3.LE.ARG(Z).LE.PI/3
34 C-----------------------------------------------------------------------
35 CALL ZUNI1
(ZR
, ZI
, GNU
, KODE
, 2, CYR
, CYI
, NW
, NLAST
, FNUL
, TOL
,
39 C-----------------------------------------------------------------------
40 C ASYMPTOTIC EXPANSION FOR J(FNU,Z*EXP(M*HPI)) FOR LARGE FNU
41 C APPLIED IN PI/3.LT.ABS(ARG(Z)).LE.PI/2 WHERE M=+I OR -I
43 C-----------------------------------------------------------------------
44 CALL ZUNI2
(ZR
, ZI
, GNU
, KODE
, 2, CYR
, CYI
, NW
, NLAST
, FNUL
, TOL
,
49 STR
= AZABS
(CYR
(1),CYI
(1))
50 C----------------------------------------------------------------------
51 C SCALE BACKWARD RECURRENCE, BRY(3) IS DEFINED BUT NEVER USED
52 C----------------------------------------------------------------------
53 BRY
(1)=1.0D
+3*D1MACH
(1)/TOL
59 IF (STR
.GT
.BRY
(1)) GO TO 21
65 IF (STR
.LT
.BRY
(2)) GO TO 25
75 RAZ
= 1.0D0
/AZABS
(ZR
,ZI
)
83 S2R
= (DFNU
+FNUI
)*(RZR*STR
-RZI*STI
) + S1R
84 S2I
= (DFNU
+FNUI
)*(RZR*STI
+RZI*STR
) + S1I
88 IF (IFLAG
.GE
.3) GO TO 30
94 IF (C1M
.LE
.ASCLE
) GO TO 30
112 FNUI
= DBLE
(FLOAT
(NL
))
117 S2R
= (FNU
+FNUI
)*(RZR*STR
-RZI*STI
) + S1R
118 S2I
= (FNU
+FNUI
)*(RZR*STI
+RZI*STR
) + S1I
127 IF (IFLAG
.GE
.3) GO TO 40
131 IF (C1M
.LE
.ASCLE
) GO TO 40
151 IF (IFORM
.EQ
.2) GO TO 70
152 C-----------------------------------------------------------------------
153 C ASYMPTOTIC EXPANSION FOR I(FNU,Z) FOR LARGE FNU APPLIED IN
154 C -PI/3.LE.ARG(Z).LE.PI/3
155 C-----------------------------------------------------------------------
156 CALL ZUNI1
(ZR
, ZI
, FNU
, KODE
, N
, YR
, YI
, NW
, NLAST
, FNUL
, TOL
,
160 C-----------------------------------------------------------------------
161 C ASYMPTOTIC EXPANSION FOR J(FNU,Z*EXP(M*HPI)) FOR LARGE FNU
162 C APPLIED IN PI/3.LT.ABS(ARG(Z)).LE.PI/2 WHERE M=+I OR -I
164 C-----------------------------------------------------------------------
165 CALL ZUNI2
(ZR
, ZI
, FNU
, KODE
, N
, YR
, YI
, NW
, NLAST
, FNUL
, TOL
,
168 IF (NW
.LT
.0) GO TO 50