2 SUBROUTINE ZS1S2
(ZRR
, ZRI
, S1R
, S1I
, S2R
, S2I
, NZ
, ASCLE
, ALIM
,
4 C***BEGIN PROLOGUE ZS1S2
6 C***PURPOSE Subsidiary to ZAIRY and ZBESK
8 C***TYPE ALL (CS1S2-A, ZS1S2-A)
9 C***AUTHOR Amos, D. E., (SNL)
12 C ZS1S2 TESTS FOR A POSSIBLE UNDERFLOW RESULTING FROM THE
13 C ADDITION OF THE I AND K FUNCTIONS IN THE ANALYTIC CON-
14 C TINUATION FORMULA WHERE S1=K FUNCTION AND S2=I FUNCTION.
15 C ON KODE=1 THE I AND K FUNCTIONS ARE DIFFERENT ORDERS OF
16 C MAGNITUDE, BUT FOR KODE=2 THEY CAN BE OF THE SAME ORDER
17 C OF MAGNITUDE AND THE MAXIMUM MUST BE AT LEAST ONE
18 C PRECISION ABOVE THE UNDERFLOW LIMIT.
20 C***SEE ALSO ZAIRY, ZBESK
21 C***ROUTINES CALLED ZABS, ZEXP, ZLOG
22 C***REVISION HISTORY (YYMMDD)
24 C 910415 Prologue converted to Version 4.0 format. (BAB)
25 C 930122 Added ZEXP and ZLOG to EXTERNAL statement. (RWC)
26 C***END PROLOGUE ZS1S2
27 C COMPLEX CZERO,C1,S1,S1D,S2,ZR
28 DOUBLE PRECISION AA
, ALIM
, ALN
, ASCLE
, AS1
, AS2
, C1I
, C1R
, S1DI
,
29 * S1DR
, S1I
, S1R
, S2I
, S2R
, ZEROI
, ZEROR
, ZRI
, ZRR
, ZABS
31 EXTERNAL ZABS
, ZEXP
, ZLOG
32 DATA ZEROR
,ZEROI
/ 0.0D0
, 0.0D0
/
33 C***FIRST EXECUTABLE STATEMENT ZS1S2
37 IF (S1R
.EQ
.0.0D0
.AND
. S1I
.EQ
.0.0D0
) GO TO 10
38 IF (AS1
.EQ
.0.0D0
) GO TO 10
39 ALN
= -ZRR
- ZRR
+ LOG
(AS1
)
45 IF (ALN
.LT
.(-ALIM
)) GO TO 10
46 CALL ZLOG
(S1DR
, S1DI
, C1R
, C1I
, IDUM
)
49 CALL ZEXP
(C1R
, C1I
, S1R
, S1I
)
54 IF (AA
.GT
.ASCLE
) RETURN