LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ dlarrk()

subroutine dlarrk ( integer  N,
integer  IW,
double precision  GL,
double precision  GU,
double precision, dimension( * )  D,
double precision, dimension( * )  E2,
double precision  PIVMIN,
double precision  RELTOL,
double precision  W,
double precision  WERR,
integer  INFO 
)

DLARRK computes one eigenvalue of a symmetric tridiagonal matrix T to suitable accuracy.

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

Purpose:
 DLARRK computes one eigenvalue of a symmetric tridiagonal
 matrix T to suitable accuracy. This is an auxiliary code to be
 called from DSTEMR.

 To avoid overflow, the matrix must be scaled so that its
 largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and for greatest
 accuracy, it should not be much smaller than that.

 See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
 Matrix", Report CS41, Computer Science Dept., Stanford
 University, July 21, 1966.
Parameters
[in]N
          N is INTEGER
          The order of the tridiagonal matrix T.  N >= 0.
[in]IW
          IW is INTEGER
          The index of the eigenvalues to be returned.
[in]GL
          GL is DOUBLE PRECISION
[in]GU
          GU is DOUBLE PRECISION
          An upper and a lower bound on the eigenvalue.
[in]D
          D is DOUBLE PRECISION array, dimension (N)
          The n diagonal elements of the tridiagonal matrix T.
[in]E2
          E2 is DOUBLE PRECISION array, dimension (N-1)
          The (n-1) squared off-diagonal elements of the tridiagonal matrix T.
[in]PIVMIN
          PIVMIN is DOUBLE PRECISION
          The minimum pivot allowed in the Sturm sequence for T.
[in]RELTOL
          RELTOL is DOUBLE PRECISION
          The minimum relative width of an interval.  When an interval
          is narrower than RELTOL times the larger (in
          magnitude) endpoint, then it is considered to be
          sufficiently small, i.e., converged.  Note: this should
          always be at least radix*machine epsilon.
[out]W
          W is DOUBLE PRECISION
[out]WERR
          WERR is DOUBLE PRECISION
          The error bound on the corresponding eigenvalue approximation
          in W.
[out]INFO
          INFO is INTEGER
          = 0:       Eigenvalue converged
          = -1:      Eigenvalue did NOT converge
Internal Parameters:
  FUDGE   DOUBLE PRECISION, default = 2
          A "fudge factor" to widen the Gershgorin intervals.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
June 2017

Definition at line 147 of file dlarrk.f.

147 *
148 * -- LAPACK auxiliary routine (version 3.7.1) --
149 * -- LAPACK is a software package provided by Univ. of Tennessee, --
150 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
151 * June 2017
152 *
153 * .. Scalar Arguments ..
154  INTEGER info, iw, n
155  DOUBLE PRECISION pivmin, reltol, gl, gu, w, werr
156 * ..
157 * .. Array Arguments ..
158  DOUBLE PRECISION d( * ), e2( * )
159 * ..
160 *
161 * =====================================================================
162 *
163 * .. Parameters ..
164  DOUBLE PRECISION fudge, half, two, zero
165  parameter( half = 0.5d0, two = 2.0d0,
166  $ fudge = two, zero = 0.0d0 )
167 * ..
168 * .. Local Scalars ..
169  INTEGER i, it, itmax, negcnt
170  DOUBLE PRECISION atoli, eps, left, mid, right, rtoli, tmp1,
171  $ tmp2, tnorm
172 * ..
173 * .. External Functions ..
174  DOUBLE PRECISION dlamch
175  EXTERNAL dlamch
176 * ..
177 * .. Intrinsic Functions ..
178  INTRINSIC abs, int, log, max
179 * ..
180 * .. Executable Statements ..
181 *
182 * Quick return if possible
183 *
184  IF( n.LE.0 ) THEN
185  info = 0
186  RETURN
187  END IF
188 *
189 * Get machine constants
190  eps = dlamch( 'P' )
191 
192  tnorm = max( abs( gl ), abs( gu ) )
193  rtoli = reltol
194  atoli = fudge*two*pivmin
195 
196  itmax = int( ( log( tnorm+pivmin )-log( pivmin ) ) /
197  $ log( two ) ) + 2
198 
199  info = -1
200 
201  left = gl - fudge*tnorm*eps*n - fudge*two*pivmin
202  right = gu + fudge*tnorm*eps*n + fudge*two*pivmin
203  it = 0
204 
205  10 CONTINUE
206 *
207 * Check if interval converged or maximum number of iterations reached
208 *
209  tmp1 = abs( right - left )
210  tmp2 = max( abs(right), abs(left) )
211  IF( tmp1.LT.max( atoli, pivmin, rtoli*tmp2 ) ) THEN
212  info = 0
213  GOTO 30
214  ENDIF
215  IF(it.GT.itmax)
216  $ GOTO 30
217 
218 *
219 * Count number of negative pivots for mid-point
220 *
221  it = it + 1
222  mid = half * (left + right)
223  negcnt = 0
224  tmp1 = d( 1 ) - mid
225  IF( abs( tmp1 ).LT.pivmin )
226  $ tmp1 = -pivmin
227  IF( tmp1.LE.zero )
228  $ negcnt = negcnt + 1
229 *
230  DO 20 i = 2, n
231  tmp1 = d( i ) - e2( i-1 ) / tmp1 - mid
232  IF( abs( tmp1 ).LT.pivmin )
233  $ tmp1 = -pivmin
234  IF( tmp1.LE.zero )
235  $ negcnt = negcnt + 1
236  20 CONTINUE
237 
238  IF(negcnt.GE.iw) THEN
239  right = mid
240  ELSE
241  left = mid
242  ENDIF
243  GOTO 10
244 
245  30 CONTINUE
246 *
247 * Converged or maximum number of iterations reached
248 *
249  w = half * (left + right)
250  werr = half * abs( right - left )
251 
252  RETURN
253 *
254 * End of DLARRK
255 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
Here is the caller graph for this function: