1 SUBROUTINE ZKSCL
(ZRR
,ZRI
,FNU
,N
,YR
,YI
,NZ
,RZR
,RZI
,ASCLE
,TOL
,ELIM
)
2 C***BEGIN PROLOGUE ZKSCL
5 C SET K FUNCTIONS TO ZERO ON UNDERFLOW, CONTINUE RECURRENCE
6 C ON SCALED FUNCTIONS UNTIL TWO MEMBERS COME ON SCALE, THEN
7 C RETURN WITH MIN(NZ+2,N) VALUES SCALED BY 1/TOL.
9 C***ROUTINES CALLED ZUCHK,AZABS,AZLOG
10 C***END PROLOGUE ZKSCL
11 C COMPLEX CK,CS,CY,CZERO,RZ,S1,S2,Y,ZR,ZD,CELM
12 DOUBLE PRECISION ACS
, AS
, ASCLE
, CKI
, CKR
, CSI
, CSR
, CYI
,
13 * CYR
, ELIM
, FN
, FNU
, RZI
, RZR
, STR
, S1I
, S1R
, S2I
,
14 * S2R
, TOL
, YI
, YR
, ZEROI
, ZEROR
, ZRI
, ZRR
, AZABS
,
15 * ZDR
, ZDI
, CELMR
, ELM
, HELIM
, ALAS
16 INTEGER I
, IC
, IDUM
, KK
, N
, NN
, NW
, NZ
17 DIMENSION YR
(N
), YI
(N
), CYR
(2), CYI
(2)
18 DATA ZEROR
,ZEROI
/ 0.0D0
, 0.0D0
/
33 IF (ACS
.LT
.(-ELIM
)) GO TO 10
34 CALL AZLOG
(S1R
, S1I
, CSR
, CSI
, IDUM
)
40 CALL ZUCHK
(CSR
, CSI
, NW
, ASCLE
, TOL
)
68 C FIND TWO CONSECUTIVE Y VALUES ON SCALE. SCALE RECURRENCE IF
69 C S2 GETS LARGER THAN EXP(ELIM/2)
75 S2R
= CKR*CSR
- CKI*CSI
+ S1R
76 S2I
= CKI*CSR
+ CKR*CSI
+ S1I
87 IF (ACS
.LT
.(-ELIM
)) GO TO 25
88 CALL AZLOG
(S2R
, S2I
, CSR
, CSI
, IDUM
)
94 CALL ZUCHK
(CSR
, CSI
, NW
, ASCLE
, TOL
)
99 IF (IC
.EQ
.KK
-1) GO TO 40
103 IF(ALAS
.LT
.HELIM
) GO TO 30