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

◆ dlarrr()

subroutine dlarrr ( integer n,
double precision, dimension( * ) d,
double precision, dimension( * ) e,
integer info )

DLARRR performs tests to decide whether the symmetric tridiagonal matrix T warrants expensive computations which guarantee high relative accuracy in the eigenvalues.

Download DLARRR + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!>
!> Perform tests to decide whether the symmetric tridiagonal matrix T
!> warrants expensive computations which guarantee high relative accuracy
!> in the eigenvalues.
!> 
Parameters
[in]N
!>          N is INTEGER
!>          The order of the matrix. N > 0.
!> 
[in]D
!>          D is DOUBLE PRECISION array, dimension (N)
!>          The N diagonal elements of the tridiagonal matrix T.
!> 
[in,out]E
!>          E is DOUBLE PRECISION array, dimension (N)
!>          On entry, the first (N-1) entries contain the subdiagonal
!>          elements of the tridiagonal matrix T; E(N) is set to ZERO.
!> 
[out]INFO
!>          INFO is INTEGER
!>          INFO = 0(default) : the matrix warrants computations preserving
!>                              relative accuracy.
!>          INFO = 1          : the matrix warrants computations guaranteeing
!>                              only absolute accuracy.
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Contributors:
Beresford Parlett, University of California, Berkeley, USA
Jim Demmel, University of California, Berkeley, USA
Inderjit Dhillon, University of Texas, Austin, USA
Osni Marques, LBNL/NERSC, USA
Christof Voemel, University of California, Berkeley, USA

Definition at line 91 of file dlarrr.f.

92*
93* -- LAPACK auxiliary routine --
94* -- LAPACK is a software package provided by Univ. of Tennessee, --
95* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
96*
97* .. Scalar Arguments ..
98 INTEGER N, INFO
99* ..
100* .. Array Arguments ..
101 DOUBLE PRECISION D( * ), E( * )
102* ..
103*
104*
105* =====================================================================
106*
107* .. Parameters ..
108 DOUBLE PRECISION ZERO, RELCOND
109 parameter( zero = 0.0d0,
110 $ relcond = 0.999d0 )
111* ..
112* .. Local Scalars ..
113 INTEGER I
114 LOGICAL YESREL
115 DOUBLE PRECISION EPS, SAFMIN, SMLNUM, RMIN, TMP, TMP2,
116 $ OFFDIG, OFFDIG2
117
118* ..
119* .. External Functions ..
120 DOUBLE PRECISION DLAMCH
121 EXTERNAL dlamch
122* ..
123* .. Intrinsic Functions ..
124 INTRINSIC abs
125* ..
126* .. Executable Statements ..
127*
128* Quick return if possible
129*
130 IF( n.LE.0 ) THEN
131 info = 0
132 RETURN
133 END IF
134*
135* As a default, do NOT go for relative-accuracy preserving computations.
136 info = 1
137
138 safmin = dlamch( 'Safe minimum' )
139 eps = dlamch( 'Precision' )
140 smlnum = safmin / eps
141 rmin = sqrt( smlnum )
142
143* Tests for relative accuracy
144*
145* Test for scaled diagonal dominance
146* Scale the diagonal entries to one and check whether the sum of the
147* off-diagonals is less than one
148*
149* The sdd relative error bounds have a 1/(1- 2*x) factor in them,
150* x = max(OFFDIG + OFFDIG2), so when x is close to 1/2, no relative
151* accuracy is promised. In the notation of the code fragment below,
152* 1/(1 - (OFFDIG + OFFDIG2)) is the condition number.
153* We don't think it is worth going into "sdd mode" unless the relative
154* condition number is reasonable, not 1/macheps.
155* The threshold should be compatible with other thresholds used in the
156* code. We set OFFDIG + OFFDIG2 <= .999 =: RELCOND, it corresponds
157* to losing at most 3 decimal digits: 1 / (1 - (OFFDIG + OFFDIG2)) <= 1000
158* instead of the current OFFDIG + OFFDIG2 < 1
159*
160 yesrel = .true.
161 offdig = zero
162 tmp = sqrt(abs(d(1)))
163 IF (tmp.LT.rmin) yesrel = .false.
164 IF(.NOT.yesrel) GOTO 11
165 DO 10 i = 2, n
166 tmp2 = sqrt(abs(d(i)))
167 IF (tmp2.LT.rmin) yesrel = .false.
168 IF(.NOT.yesrel) GOTO 11
169 offdig2 = abs(e(i-1))/(tmp*tmp2)
170 IF(offdig+offdig2.GE.relcond) yesrel = .false.
171 IF(.NOT.yesrel) GOTO 11
172 tmp = tmp2
173 offdig = offdig2
174 10 CONTINUE
175 11 CONTINUE
176
177 IF( yesrel ) THEN
178 info = 0
179 RETURN
180 ELSE
181 ENDIF
182*
183
184*
185* *** MORE TO BE IMPLEMENTED ***
186*
187
188*
189* Test if the lower bidiagonal matrix L from T = L D L^T
190* (zero shift facto) is well conditioned
191*
192
193*
194* Test if the upper bidiagonal matrix U from T = U D U^T
195* (zero shift facto) is well conditioned.
196* In this case, the matrix needs to be flipped and, at the end
197* of the eigenvector computation, the flip needs to be applied
198* to the computed eigenvectors (and the support)
199*
200
201*
202 RETURN
203*
204* End of DLARRR
205*
double precision function dlamch(cmach)
DLAMCH
Definition dlamch.f:69
Here is the caller graph for this function: