LAPACK 3.3.1
Linear Algebra PACKage
|
00001 LOGICAL FUNCTION ZLCTES( Z, D ) 00002 * 00003 * -- LAPACK test routine (version 3.1) -- 00004 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. 00005 * November 2006 00006 * 00007 * .. Scalar Arguments .. 00008 COMPLEX*16 D, Z 00009 * .. 00010 * 00011 * Purpose 00012 * ======= 00013 * 00014 * ZLCTES returns .TRUE. if the eigenvalue Z/D is to be selected 00015 * (specifically, in this subroutine, if the real part of the 00016 * eigenvalue is negative), and otherwise it returns .FALSE.. 00017 * 00018 * It is used by the test routine ZDRGES to test whether the driver 00019 * routine ZGGES succesfully sorts eigenvalues. 00020 * 00021 * Arguments 00022 * ========= 00023 * 00024 * Z (input) COMPLEX*16 00025 * The numerator part of a complex eigenvalue Z/D. 00026 * 00027 * D (input) COMPLEX*16 00028 * The denominator part of a complex eigenvalue Z/D. 00029 * 00030 * ===================================================================== 00031 * 00032 * .. Parameters .. 00033 * 00034 DOUBLE PRECISION ZERO, ONE 00035 PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) 00036 COMPLEX*16 CZERO 00037 PARAMETER ( CZERO = ( 0.0D+0, 0.0D+0 ) ) 00038 * .. 00039 * .. Local Scalars .. 00040 DOUBLE PRECISION ZMAX 00041 * .. 00042 * .. Intrinsic Functions .. 00043 INTRINSIC ABS, DBLE, DIMAG, MAX, SIGN 00044 * .. 00045 * .. Executable Statements .. 00046 * 00047 IF( D.EQ.CZERO ) THEN 00048 ZLCTES = ( DBLE( Z ).LT.ZERO ) 00049 ELSE 00050 IF( DBLE( Z ).EQ.ZERO .OR. DBLE( D ).EQ.ZERO ) THEN 00051 ZLCTES = ( SIGN( ONE, DIMAG( Z ) ).NE. 00052 $ SIGN( ONE, DIMAG( D ) ) ) 00053 ELSE IF( DIMAG( Z ).EQ.ZERO .OR. DIMAG( D ).EQ.ZERO ) THEN 00054 ZLCTES = ( SIGN( ONE, DBLE( Z ) ).NE. 00055 $ SIGN( ONE, DBLE( D ) ) ) 00056 ELSE 00057 ZMAX = MAX( ABS( DBLE( Z ) ), ABS( DIMAG( Z ) ) ) 00058 ZLCTES = ( ( DBLE( Z ) / ZMAX )*DBLE( D )+ 00059 $ ( DIMAG( Z ) / ZMAX )*DIMAG( D ).LT.ZERO ) 00060 END IF 00061 END IF 00062 * 00063 RETURN 00064 * 00065 * End of ZLCTES 00066 * 00067 END