LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
logical function zslect ( complex*16  Z)

ZSLECT

Purpose:
 ZSLECT returns .TRUE. if the eigenvalue Z is to be selected,
 otherwise it returns .FALSE.
 It is used by ZCHK41 to test if ZGEES successfully sorts eigenvalues,
 and by ZCHK43 to test if ZGEESX successfully sorts eigenvalues.

 The common block /SSLCT/ controls how eigenvalues are selected.
 If SELOPT = 0, then ZSLECT return .TRUE. when real(Z) is less than
 zero, and .FALSE. otherwise.
 If SELOPT is at least 1, ZSLECT returns SELVAL(SELOPT) and adds 1
 to SELOPT, cycling back to 1 at SELMAX.
Parameters
[in]Z
          Z is COMPLEX*16
          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 zslect.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*16 z
66 * ..
67 *
68 * =====================================================================
69 *
70 * .. Parameters ..
71  DOUBLE PRECISION zero
72  parameter ( zero = 0.0d0 )
73 * ..
74 * .. Local Scalars ..
75  INTEGER i
76  DOUBLE PRECISION rmin, x
77 * ..
78 * .. Scalars in Common ..
79  INTEGER seldim, selopt
80 * ..
81 * .. Arrays in Common ..
82  LOGICAL selval( 20 )
83  DOUBLE PRECISION selwi( 20 ), selwr( 20 )
84 * ..
85 * .. Common blocks ..
86  COMMON / sslct / selopt, seldim, selval, selwr, selwi
87 * ..
88 * .. Intrinsic Functions ..
89  INTRINSIC abs, dble, dcmplx
90 * ..
91 * .. Executable Statements ..
92 *
93  IF( selopt.EQ.0 ) THEN
94  zslect = ( dble( z ).LT.zero )
95  ELSE
96  rmin = abs( z-dcmplx( selwr( 1 ), selwi( 1 ) ) )
97  zslect = selval( 1 )
98  DO 10 i = 2, seldim
99  x = abs( z-dcmplx( selwr( i ), selwi( i ) ) )
100  IF( x.LE.rmin ) THEN
101  rmin = x
102  zslect = selval( i )
103  END IF
104  10 CONTINUE
105  END IF
106  RETURN
107 *
108 * End of ZSLECT
109 *
logical function zslect(Z)
ZSLECT
Definition: zslect.f:58