00001 SUBROUTINE ZUCHK(YR, YI, NZ, ASCLE, TOL) 00002 C***BEGIN PROLOGUE ZUCHK 00003 C***REFER TO ZSERI,ZUOIK,ZUNK1,ZUNK2,ZUNI1,ZUNI2,ZKSCL 00004 C 00005 C Y ENTERS AS A SCALED QUANTITY WHOSE MAGNITUDE IS GREATER THAN 00006 C EXP(-ALIM)=ASCLE=1.0E+3*D1MACH(1)/TOL. THE TEST IS MADE TO SEE 00007 C IF THE MAGNITUDE OF THE REAL OR IMAGINARY PART WOULD UNDERFLOW 00008 C WHEN Y IS SCALED (BY TOL) TO ITS PROPER VALUE. Y IS ACCEPTED 00009 C IF THE UNDERFLOW IS AT LEAST ONE PRECISION BELOW THE MAGNITUDE 00010 C OF THE LARGEST COMPONENT; OTHERWISE THE PHASE ANGLE DOES NOT HAVE 00011 C ABSOLUTE ACCURACY AND AN UNDERFLOW IS ASSUMED. 00012 C 00013 C***ROUTINES CALLED (NONE) 00014 C***END PROLOGUE ZUCHK 00015 C 00016 C COMPLEX Y 00017 DOUBLE PRECISION ASCLE, SS, ST, TOL, WR, WI, YR, YI 00018 INTEGER NZ 00019 NZ = 0 00020 WR = DABS(YR) 00021 WI = DABS(YI) 00022 ST = DMIN1(WR,WI) 00023 IF (ST.GT.ASCLE) RETURN 00024 SS = DMAX1(WR,WI) 00025 ST = ST/TOL 00026 IF (SS.LT.ST) NZ = 1 00027 RETURN 00028 END