cbinu.f

Go to the documentation of this file.
00001       SUBROUTINE CBINU(Z, FNU, KODE, N, CY, NZ, RL, FNUL, TOL, ELIM,
00002      * ALIM)
00003 C***BEGIN PROLOGUE  CBINU
00004 C***REFER TO  CBESH,CBESI,CBESJ,CBESK,CAIRY,CBIRY
00005 C
00006 C     CBINU COMPUTES THE I FUNCTION IN THE RIGHT HALF Z PLANE
00007 C
00008 C***ROUTINES CALLED  CASYI,CBUNI,CMLRI,CSERI,CUOIK,CWRSK
00009 C***END PROLOGUE  CBINU
00010       COMPLEX CW, CY, CZERO, Z
00011       REAL ALIM, AZ, DFNU, ELIM, FNU, FNUL, RL, TOL
00012       INTEGER I, INW, KODE, N, NLAST, NN, NUI, NW, NZ
00013       DIMENSION CY(N), CW(2)
00014       DATA CZERO / (0.0E0,0.0E0) /
00015 C
00016       NZ = 0
00017       AZ = CABS(Z)
00018       NN = N
00019       DFNU = FNU + FLOAT(N-1)
00020       IF (AZ.LE.2.0E0) GO TO 10
00021       IF (AZ*AZ*0.25E0.GT.DFNU+1.0E0) GO TO 20
00022    10 CONTINUE
00023 C-----------------------------------------------------------------------
00024 C     POWER SERIES
00025 C-----------------------------------------------------------------------
00026       CALL CSERI(Z, FNU, KODE, NN, CY, NW, TOL, ELIM, ALIM)
00027       INW = IABS(NW)
00028       NZ = NZ + INW
00029       NN = NN - INW
00030       IF (NN.EQ.0) RETURN
00031       IF (NW.GE.0) GO TO 120
00032       DFNU = FNU + FLOAT(NN-1)
00033    20 CONTINUE
00034       IF (AZ.LT.RL) GO TO 40
00035       IF (DFNU.LE.1.0E0) GO TO 30
00036       IF (AZ+AZ.LT.DFNU*DFNU) GO TO 50
00037 C-----------------------------------------------------------------------
00038 C     ASYMPTOTIC EXPANSION FOR LARGE Z
00039 C-----------------------------------------------------------------------
00040    30 CONTINUE
00041       CALL CASYI(Z, FNU, KODE, NN, CY, NW, RL, TOL, ELIM, ALIM)
00042       IF (NW.LT.0) GO TO 130
00043       GO TO 120
00044    40 CONTINUE
00045       IF (DFNU.LE.1.0E0) GO TO 70
00046    50 CONTINUE
00047 C-----------------------------------------------------------------------
00048 C     OVERFLOW AND UNDERFLOW TEST ON I SEQUENCE FOR MILLER ALGORITHM
00049 C-----------------------------------------------------------------------
00050       CALL CUOIK(Z, FNU, KODE, 1, NN, CY, NW, TOL, ELIM, ALIM)
00051       IF (NW.LT.0) GO TO 130
00052       NZ = NZ + NW
00053       NN = NN - NW
00054       IF (NN.EQ.0) RETURN
00055       DFNU = FNU+FLOAT(NN-1)
00056       IF (DFNU.GT.FNUL) GO TO 110
00057       IF (AZ.GT.FNUL) GO TO 110
00058    60 CONTINUE
00059       IF (AZ.GT.RL) GO TO 80
00060    70 CONTINUE
00061 C-----------------------------------------------------------------------
00062 C     MILLER ALGORITHM NORMALIZED BY THE SERIES
00063 C-----------------------------------------------------------------------
00064       CALL CMLRI(Z, FNU, KODE, NN, CY, NW, TOL)
00065       IF(NW.LT.0) GO TO 130
00066       GO TO 120
00067    80 CONTINUE
00068 C-----------------------------------------------------------------------
00069 C     MILLER ALGORITHM NORMALIZED BY THE WRONSKIAN
00070 C-----------------------------------------------------------------------
00071 C-----------------------------------------------------------------------
00072 C     OVERFLOW TEST ON K FUNCTIONS USED IN WRONSKIAN
00073 C-----------------------------------------------------------------------
00074       CALL CUOIK(Z, FNU, KODE, 2, 2, CW, NW, TOL, ELIM, ALIM)
00075       IF (NW.GE.0) GO TO 100
00076       NZ = NN
00077       DO 90 I=1,NN
00078         CY(I) = CZERO
00079    90 CONTINUE
00080       RETURN
00081   100 CONTINUE
00082       IF (NW.GT.0) GO TO 130
00083       CALL CWRSK(Z, FNU, KODE, NN, CY, NW, CW, TOL, ELIM, ALIM)
00084       IF (NW.LT.0) GO TO 130
00085       GO TO 120
00086   110 CONTINUE
00087 C-----------------------------------------------------------------------
00088 C     INCREMENT FNU+NN-1 UP TO FNUL, COMPUTE AND RECUR BACKWARD
00089 C-----------------------------------------------------------------------
00090       NUI = INT(FNUL-DFNU) + 1
00091       NUI = MAX0(NUI,0)
00092       CALL CBUNI(Z, FNU, KODE, NN, CY, NW, NUI, NLAST, FNUL, TOL, ELIM,
00093      * ALIM)
00094       IF (NW.LT.0) GO TO 130
00095       NZ = NZ + NW
00096       IF (NLAST.EQ.0) GO TO 120
00097       NN = NLAST
00098       GO TO 60
00099   120 CONTINUE
00100       RETURN
00101   130 CONTINUE
00102       NZ = -1
00103       IF(NW.EQ.(-2)) NZ=-2
00104       RETURN
00105       END
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines