LAPACK 3.11.0
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 93 of file dlarrr.f.

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