LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ dslect()

logical function dslect ( double precision  zr,
double precision  zi 
)

DSLECT

Purpose:
 DSLECT returns .TRUE. if the eigenvalue ZR+sqrt(-1)*ZI is to be
 selected, and otherwise it returns .FALSE.
 It is used by DCHK41 to test if DGEES successfully sorts eigenvalues,
 and by DCHK43 to test if DGEESX successfully sorts eigenvalues.

 The common block /SSLCT/ controls how eigenvalues are selected.
 If SELOPT = 0, then DSLECT return .TRUE. when ZR is less than zero,
 and .FALSE. otherwise.
 If SELOPT is at least 1, DSLECT returns SELVAL(SELOPT) and adds 1
 to SELOPT, cycling back to 1 at SELMAX.
Parameters
[in]ZR
          ZR is DOUBLE PRECISION
          The real part of a complex eigenvalue ZR + i*ZI.
[in]ZI
          ZI is DOUBLE PRECISION
          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 dslect.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 DOUBLE PRECISION ZI, ZR
69* ..
70*
71* =====================================================================
72*
73* .. Arrays in Common ..
74 LOGICAL SELVAL( 20 )
75 DOUBLE PRECISION 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 DOUBLE PRECISION RMIN, X
86* ..
87* .. Parameters ..
88 DOUBLE PRECISION ZERO
89 parameter( zero = 0.0d0 )
90* ..
91* .. External Functions ..
92 DOUBLE PRECISION DLAPY2
93 EXTERNAL dlapy2
94* ..
95* .. Executable Statements ..
96*
97 IF( selopt.EQ.0 ) THEN
98 dslect = ( zr.LT.zero )
99 ELSE
100 rmin = dlapy2( zr-selwr( 1 ), zi-selwi( 1 ) )
101 dslect = selval( 1 )
102 DO 10 i = 2, seldim
103 x = dlapy2( zr-selwr( i ), zi-selwi( i ) )
104 IF( x.LE.rmin ) THEN
105 rmin = x
106 dslect = selval( i )
107 END IF
108 10 CONTINUE
109 END IF
110 RETURN
111*
112* End of DSLECT
113*
logical function dslect(zr, zi)
DSLECT
Definition dslect.f:62
double precision function dlapy2(x, y)
DLAPY2 returns sqrt(x2+y2).
Definition dlapy2.f:63
Here is the call graph for this function:
Here is the caller graph for this function: