1 SUBROUTINE ZS1S2
(ZRR
, ZRI
, S1R
, S1I
, S2R
, S2I
, NZ
, ASCLE
, ALIM
,
3 C***BEGIN PROLOGUE ZS1S2
4 C***REFER TO ZBESK,ZAIRY
6 C ZS1S2 TESTS FOR A POSSIBLE UNDERFLOW RESULTING FROM THE
7 C ADDITION OF THE I AND K FUNCTIONS IN THE ANALYTIC CON-
8 C TINUATION FORMULA WHERE S1=K FUNCTION AND S2=I FUNCTION.
9 C ON KODE=1 THE I AND K FUNCTIONS ARE DIFFERENT ORDERS OF
10 C MAGNITUDE, BUT FOR KODE=2 THEY CAN BE OF THE SAME ORDER
11 C OF MAGNITUDE AND THE MAXIMUM MUST BE AT LEAST ONE
12 C PRECISION ABOVE THE UNDERFLOW LIMIT.
14 C***ROUTINES CALLED AZABS,AZEXP,AZLOG
15 C***END PROLOGUE ZS1S2
16 C COMPLEX CZERO,C1,S1,S1D,S2,ZR
17 DOUBLE PRECISION AA
, ALIM
, ALN
, ASCLE
, AS1
, AS2
, C1I
, C1R
, S1DI
,
18 * S1DR
, S1I
, S1R
, S2I
, S2R
, ZEROI
, ZEROR
, ZRI
, ZRR
, AZABS
20 DATA ZEROR
,ZEROI
/ 0.0D0
, 0.0D0
/
24 IF (S1R
.EQ
.0.0D0
.AND
. S1I
.EQ
.0.0D0
) GO TO 10
25 IF (AS1
.EQ
.0.0D0
) GO TO 10
26 ALN
= -ZRR
- ZRR
+ DLOG
(AS1
)
32 IF (ALN
.LT
.(-ALIM
)) GO TO 10
33 CALL AZLOG
(S1DR
, S1DI
, C1R
, C1I
, IDUM
)
36 CALL AZEXP
(C1R
, C1I
, S1R
, S1I
)
41 IF (AA
.GT
.ASCLE
) RETURN