LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
clctes.f
Go to the documentation of this file.
1 *> \brief \b CLCTES
2 *
3 * =========== DOCUMENTATION ===========
4 *
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
7 *
8 * Definition:
9 * ===========
10 *
11 * LOGICAL FUNCTION CLCTES( Z, D )
12 *
13 * .. Scalar Arguments ..
14 * COMPLEX D, Z
15 * ..
16 *
17 *
18 *> \par Purpose:
19 * =============
20 *>
21 *> \verbatim
22 *>
23 *> CLCTES returns .TRUE. if the eigenvalue Z/D is to be selected
24 *> (specifically, in this subroutine, if the real part of the
25 *> eigenvalue is negative), and otherwise it returns .FALSE..
26 *>
27 *> It is used by the test routine CDRGES to test whether the driver
28 *> routine CGGES successfully sorts eigenvalues.
29 *> \endverbatim
30 *
31 * Arguments:
32 * ==========
33 *
34 *> \param[in] Z
35 *> \verbatim
36 *> Z is COMPLEX
37 *> The numerator part of a complex eigenvalue Z/D.
38 *> \endverbatim
39 *>
40 *> \param[in] D
41 *> \verbatim
42 *> D is COMPLEX
43 *> The denominator part of a complex eigenvalue Z/D.
44 *> \endverbatim
45 *
46 * Authors:
47 * ========
48 *
49 *> \author Univ. of Tennessee
50 *> \author Univ. of California Berkeley
51 *> \author Univ. of Colorado Denver
52 *> \author NAG Ltd.
53 *
54 *> \date June 2016
55 *
56 *> \ingroup complex_eig
57 *
58 * =====================================================================
59  LOGICAL FUNCTION clctes( Z, D )
60 *
61 * -- LAPACK test routine (version 3.6.1) --
62 * -- LAPACK is a software package provided by Univ. of Tennessee, --
63 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
64 * June 2016
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 *
107  END
logical function clctes(Z, D)
CLCTES
Definition: clctes.f:60