00001 SUBROUTINE ZS1S2(ZRR, ZRI, S1R, S1I, S2R, S2I, NZ, ASCLE, ALIM,
00002 * IUF)
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 DOUBLE PRECISION AA, ALIM, ALN, ASCLE, AS1, AS2, C1I, C1R, S1DI,
00018 * S1DR, S1I, S1R, S2I, S2R, ZEROI, ZEROR, ZRI, ZRR, XZABS
00019 INTEGER IUF, IDUM, NZ
00020 DATA ZEROR,ZEROI / 0.0D0 , 0.0D0 /
00021 NZ = 0
00022 AS1 = XZABS(S1R,S1I)
00023 AS2 = XZABS(S2R,S2I)
00024 IF (S1R.EQ.0.0D0 .AND. S1I.EQ.0.0D0) GO TO 10
00025 IF (AS1.EQ.0.0D0) GO TO 10
00026 ALN = -ZRR - ZRR + DLOG(AS1)
00027 S1DR = S1R
00028 S1DI = S1I
00029 S1R = ZEROR
00030 S1I = ZEROI
00031 AS1 = ZEROR
00032 IF (ALN.LT.(-ALIM)) GO TO 10
00033 CALL XZLOG(S1DR, S1DI, C1R, C1I, IDUM)
00034 C1R = C1R - ZRR - ZRR
00035 C1I = C1I - ZRI - ZRI
00036 CALL XZEXP(C1R, C1I, S1R, S1I)
00037 AS1 = XZABS(S1R,S1I)
00038 IUF = IUF + 1
00039 10 CONTINUE
00040 AA = DMAX1(AS1,AS2)
00041 IF (AA.GT.ASCLE) RETURN
00042 S1R = ZEROR
00043 S1I = ZEROI
00044 S2R = ZEROR
00045 S2I = ZEROI
00046 NZ = 1
00047 IUF = 0
00048 RETURN
00049 END