LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
logical function cslect ( complex  Z)

CSLECT

Purpose:
 CSLECT returns .TRUE. if the eigenvalue Z is to be selected,
 otherwise it returns .FALSE.
 It is used by CCHK41 to test if CGEES successfully sorts eigenvalues,
 and by CCHK43 to test if CGEESX successfully sorts eigenvalues.

 The common block /SSLCT/ controls how eigenvalues are selected.
 If SELOPT = 0, then CSLECT return .TRUE. when real(Z) is less than
 zero, and .FALSE. otherwise.
 If SELOPT is at least 1, CSLECT returns SELVAL(SELOPT) and adds 1
 to SELOPT, cycling back to 1 at SELMAX.
Parameters
[in]Z
          Z is COMPLEX
          The eigenvalue Z.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
June 2016

Definition at line 58 of file cslect.f.

58 *
59 * -- LAPACK test routine (version 3.6.1) --
60 * -- LAPACK is a software package provided by Univ. of Tennessee, --
61 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
62 * June 2016
63 *
64 * .. Scalar Arguments ..
65  COMPLEX z
66 * ..
67 *
68 * =====================================================================
69 *
70 * .. Parameters ..
71  REAL zero
72  parameter ( zero = 0.0e0 )
73 * ..
74 * .. Local Scalars ..
75  INTEGER i
76  REAL rmin, x
77 * ..
78 * .. Scalars in Common ..
79  INTEGER seldim, selopt
80 * ..
81 * .. Arrays in Common ..
82  LOGICAL selval( 20 )
83  REAL selwi( 20 ), selwr( 20 )
84 * ..
85 * .. Common blocks ..
86  COMMON / sslct / selopt, seldim, selval, selwr, selwi
87 * ..
88 * .. Intrinsic Functions ..
89  INTRINSIC abs, cmplx, real
90 * ..
91 * .. Executable Statements ..
92 *
93  IF( selopt.EQ.0 ) THEN
94  cslect = ( REAL( z ).LT.zero )
95  ELSE
96  rmin = abs( z-cmplx( selwr( 1 ), selwi( 1 ) ) )
97  cslect = selval( 1 )
98  DO 10 i = 2, seldim
99  x = abs( z-cmplx( selwr( i ), selwi( i ) ) )
100  IF( x.LE.rmin ) THEN
101  rmin = x
102  cslect = selval( i )
103  END IF
104  10 CONTINUE
105  END IF
106  RETURN
107 *
108 * End of CSLECT
109 *
logical function cslect(Z)
CSLECT
Definition: cslect.f:58