LAPACK 3.3.0

clctes.f

Go to the documentation of this file.
00001       LOGICAL          FUNCTION CLCTES( 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            D, Z
00009 *     ..
00010 *
00011 *  Purpose
00012 *  =======
00013 *
00014 *  CLCTES 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 CDRGES to test whether the driver
00019 *  routine CGGES succesfully sorts eigenvalues.
00020 *
00021 *  Arguments
00022 *  =========
00023 *
00024 *  Z       (input) COMPLEX
00025 *          The numerator part of a complex eigenvalue Z/D.
00026 *
00027 *  D       (input) COMPLEX
00028 *          The denominator part of a complex eigenvalue Z/D.
00029 *
00030 *  =====================================================================
00031 *
00032 *     .. Parameters ..
00033 *
00034       REAL               ZERO, ONE
00035       PARAMETER          ( ZERO = 0.0E+0, ONE = 1.0E+0 )
00036       COMPLEX            CZERO
00037       PARAMETER          ( CZERO = ( 0.0E+0, 0.0E+0 ) )
00038 *     ..
00039 *     .. Local Scalars ..
00040       REAL               ZMAX
00041 *     ..
00042 *     .. Intrinsic Functions ..
00043       INTRINSIC          ABS, AIMAG, MAX, REAL, SIGN
00044 *     ..
00045 *     .. Executable Statements ..
00046 *
00047       IF( D.EQ.CZERO ) THEN
00048          CLCTES = ( REAL( Z ).LT.ZERO )
00049       ELSE
00050          IF( REAL( Z ).EQ.ZERO .OR. REAL( D ).EQ.ZERO ) THEN
00051             CLCTES = ( SIGN( ONE, AIMAG( Z ) ).NE.
00052      $               SIGN( ONE, AIMAG( D ) ) )
00053          ELSE IF( AIMAG( Z ).EQ.ZERO .OR. AIMAG( D ).EQ.ZERO ) THEN
00054             CLCTES = ( SIGN( ONE, REAL( Z ) ).NE.
00055      $               SIGN( ONE, REAL( D ) ) )
00056          ELSE
00057             ZMAX = MAX( ABS( REAL( Z ) ), ABS( AIMAG( Z ) ) )
00058             CLCTES = ( ( REAL( Z ) / ZMAX )*REAL( D )+
00059      $               ( AIMAG( Z ) / ZMAX )*AIMAG( D ).LT.ZERO )
00060          END IF
00061       END IF
00062 *
00063       RETURN
00064 *
00065 *     End of CLCTES
00066 *
00067       END
 All Files Functions