LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
clctes.f File Reference

Go to the source code of this file.

Functions/Subroutines

logical function clctes (Z, D)
 CLCTES More...
 

Function/Subroutine Documentation

logical function clctes ( complex  Z,
complex  D 
)

CLCTES

Purpose:
 CLCTES returns .TRUE. if the eigenvalue Z/D is to be selected
 (specifically, in this subroutine, if the real part of the
 eigenvalue is negative), and otherwise it returns .FALSE..

 It is used by the test routine CDRGES to test whether the driver
 routine CGGES succesfully sorts eigenvalues.
Parameters
[in]Z
          Z is COMPLEX
          The numerator part of a complex eigenvalue Z/D.
[in]D
          D is COMPLEX
          The denominator part of a complex eigenvalue Z/D.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 60 of file clctes.f.

60 *
61 * -- LAPACK test routine (version 3.4.0) --
62 * -- LAPACK is a software package provided by Univ. of Tennessee, --
63 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
64 * November 2011
65 *
66 * .. Scalar Arguments ..
67  COMPLEX d, z
68 * ..
69 *
70 * =====================================================================
71 *
72 * .. Parameters ..
73 *
74  REAL zero, one
75  parameter( zero = 0.0e+0, one = 1.0e+0 )
76  COMPLEX czero
77  parameter( czero = ( 0.0e+0, 0.0e+0 ) )
78 * ..
79 * .. Local Scalars ..
80  REAL zmax
81 * ..
82 * .. Intrinsic Functions ..
83  INTRINSIC abs, aimag, max, REAL, sign
84 * ..
85 * .. Executable Statements ..
86 *
87  IF( d.EQ.czero ) THEN
88  clctes = ( REAL( z ).LT.zero )
89  ELSE
90  IF( REAL( z ).EQ.zero .OR. REAL( d ).EQ.zero ) then
91  clctes = ( sign( one, aimag( z ) ).NE.
92  $ sign( one, aimag( d ) ) )
93  ELSE IF( aimag( z ).EQ.zero .OR. aimag( d ).EQ.zero ) THEN
94  clctes = ( sign( one, REAL( Z ) ).NE.
95  $ sign( one, REAL( D ) ) )
96  ELSE
97  zmax = max( abs( REAL( Z ) ), abs( aimag( z ) ) )
98  clctes = ( ( REAL( Z ) / zmax )*REAL( d )+
99  $ ( aimag( z ) / zmax )*aimag( d ).LT.zero )
100  END IF
101  END IF
102 *
103  RETURN
104 *
105 * End of CLCTES
106 *
logical function clctes(Z, D)
CLCTES
Definition: clctes.f:60