LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ sslect()

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.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 61 of file sslect.f.

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