LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
zlctes.f
Go to the documentation of this file.
00001 *> \brief \b ZLCTES
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *  Definition:
00009 *  ===========
00010 *
00011 *       LOGICAL          FUNCTION ZLCTES( Z, D )
00012 * 
00013 *       .. Scalar Arguments ..
00014 *       COMPLEX*16         D, Z
00015 *       ..
00016 *  
00017 *
00018 *> \par Purpose:
00019 *  =============
00020 *>
00021 *> \verbatim
00022 *>
00023 *> ZLCTES returns .TRUE. if the eigenvalue Z/D is to be selected
00024 *> (specifically, in this subroutine, if the real part of the
00025 *> eigenvalue is negative), and otherwise it returns .FALSE..
00026 *>
00027 *> It is used by the test routine ZDRGES to test whether the driver
00028 *> routine ZGGES succesfully sorts eigenvalues.
00029 *> \endverbatim
00030 *
00031 *  Arguments:
00032 *  ==========
00033 *
00034 *> \param[in] Z
00035 *> \verbatim
00036 *>          Z is COMPLEX*16
00037 *>          The numerator part of a complex eigenvalue Z/D.
00038 *> \endverbatim
00039 *>
00040 *> \param[in] D
00041 *> \verbatim
00042 *>          D is COMPLEX*16
00043 *>          The denominator part of a complex eigenvalue Z/D.
00044 *> \endverbatim
00045 *
00046 *  Authors:
00047 *  ========
00048 *
00049 *> \author Univ. of Tennessee 
00050 *> \author Univ. of California Berkeley 
00051 *> \author Univ. of Colorado Denver 
00052 *> \author NAG Ltd. 
00053 *
00054 *> \date November 2011
00055 *
00056 *> \ingroup complex16_eig
00057 *
00058 *  =====================================================================
00059       LOGICAL          FUNCTION ZLCTES( Z, D )
00060 *
00061 *  -- LAPACK test routine (version 3.4.0) --
00062 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00063 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00064 *     November 2011
00065 *
00066 *     .. Scalar Arguments ..
00067       COMPLEX*16         D, Z
00068 *     ..
00069 *
00070 *  =====================================================================
00071 *
00072 *     .. Parameters ..
00073 *
00074       DOUBLE PRECISION   ZERO, ONE
00075       PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
00076       COMPLEX*16         CZERO
00077       PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
00078 *     ..
00079 *     .. Local Scalars ..
00080       DOUBLE PRECISION   ZMAX
00081 *     ..
00082 *     .. Intrinsic Functions ..
00083       INTRINSIC          ABS, DBLE, DIMAG, MAX, SIGN
00084 *     ..
00085 *     .. Executable Statements ..
00086 *
00087       IF( D.EQ.CZERO ) THEN
00088          ZLCTES = ( DBLE( Z ).LT.ZERO )
00089       ELSE
00090          IF( DBLE( Z ).EQ.ZERO .OR. DBLE( D ).EQ.ZERO ) THEN
00091             ZLCTES = ( SIGN( ONE, DIMAG( Z ) ).NE.
00092      $               SIGN( ONE, DIMAG( D ) ) )
00093          ELSE IF( DIMAG( Z ).EQ.ZERO .OR. DIMAG( D ).EQ.ZERO ) THEN
00094             ZLCTES = ( SIGN( ONE, DBLE( Z ) ).NE.
00095      $               SIGN( ONE, DBLE( D ) ) )
00096          ELSE
00097             ZMAX = MAX( ABS( DBLE( Z ) ), ABS( DIMAG( Z ) ) )
00098             ZLCTES = ( ( DBLE( Z ) / ZMAX )*DBLE( D )+
00099      $               ( DIMAG( Z ) / ZMAX )*DIMAG( D ).LT.ZERO )
00100          END IF
00101       END IF
00102 *
00103       RETURN
00104 *
00105 *     End of ZLCTES
00106 *
00107       END
 All Files Functions