LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 logical function sslect ( real ZR, real ZI )

SSLECT

Purpose:
``` SSLECT returns .TRUE. if the eigenvalue ZR+sqrt(-1)*ZI is to be
selected, and otherwise it returns .FALSE.
It is used by SCHK41 to test if SGEES successfully sorts eigenvalues,
and by SCHK43 to test if SGEESX successfully sorts eigenvalues.

The common block /SSLCT/ controls how eigenvalues are selected.
If SELOPT = 0, then SSLECT return .TRUE. when ZR is less than zero,
and .FALSE. otherwise.
If SELOPT is at least 1, SSLECT returns SELVAL(SELOPT) and adds 1
to SELOPT, cycling back to 1 at SELMAX.```
Parameters
 [in] ZR ``` ZR is REAL The real part of a complex eigenvalue ZR + i*ZI.``` [in] ZI ``` ZI is REAL The imaginary part of a complex eigenvalue ZR + i*ZI.```
Date
June 2016

Definition at line 64 of file sslect.f.

64 *
65 * -- LAPACK test routine (version 3.6.1) --
66 * -- LAPACK is a software package provided by Univ. of Tennessee, --
67 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
68 * June 2016
69 *
70 * .. Scalar Arguments ..
71  REAL zi, zr
72 * ..
73 *
74 * =====================================================================
75 *
76 * .. Arrays in Common ..
77  LOGICAL selval( 20 )
78  REAL selwi( 20 ), selwr( 20 )
79 * ..
80 * .. Scalars in Common ..
81  INTEGER seldim, selopt
82 * ..
83 * .. Common blocks ..
84  COMMON / sslct / selopt, seldim, selval, selwr, selwi
85 * ..
86 * .. Local Scalars ..
87  INTEGER i
88  REAL rmin, x
89 * ..
90 * .. Parameters ..
91  REAL zero
92  parameter ( zero = 0.0e0 )
93 * ..
94 * .. External Functions ..
95  REAL slapy2
96  EXTERNAL slapy2
97 * ..
98 * .. Executable Statements ..
99 *
100  IF( selopt.EQ.0 ) THEN
101  sslect = ( zr.LT.zero )
102  ELSE
103  rmin = slapy2( zr-selwr( 1 ), zi-selwi( 1 ) )
104  sslect = selval( 1 )
105  DO 10 i = 2, seldim
106  x = slapy2( zr-selwr( i ), zi-selwi( i ) )
107  IF( x.LE.rmin ) THEN
108  rmin = x
109  sslect = selval( i )
110  END IF
111  10 CONTINUE
112  END IF
113  RETURN
114 *
115 * End of SSLECT
116 *
real function slapy2(X, Y)
SLAPY2 returns sqrt(x2+y2).
Definition: slapy2.f:65
logical function sslect(ZR, ZI)
SSLECT
Definition: sslect.f:64