LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ 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.
Date
June 2017
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 96 of file dlarrr.f.

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