LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 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.

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.```
Date
September 2012

Definition at line 147 of file dlarrk.f.

147 *
148 * -- LAPACK auxiliary routine (version 3.4.2) --
149 * -- LAPACK is a software package provided by Univ. of Tennessee, --
150 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
151 * September 2012
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 * Get machine constants
183  eps = dlamch( 'P' )
184
185  tnorm = max( abs( gl ), abs( gu ) )
186  rtoli = reltol
187  atoli = fudge*two*pivmin
188
189  itmax = int( ( log( tnorm+pivmin )-log( pivmin ) ) /
190  \$ log( two ) ) + 2
191
192  info = -1
193
194  left = gl - fudge*tnorm*eps*n - fudge*two*pivmin
195  right = gu + fudge*tnorm*eps*n + fudge*two*pivmin
196  it = 0
197
198  10 CONTINUE
199 *
200 * Check if interval converged or maximum number of iterations reached
201 *
202  tmp1 = abs( right - left )
203  tmp2 = max( abs(right), abs(left) )
204  IF( tmp1.LT.max( atoli, pivmin, rtoli*tmp2 ) ) THEN
205  info = 0
206  GOTO 30
207  ENDIF
208  IF(it.GT.itmax)
209  \$ GOTO 30
210
211 *
212 * Count number of negative pivots for mid-point
213 *
214  it = it + 1
215  mid = half * (left + right)
216  negcnt = 0
217  tmp1 = d( 1 ) - mid
218  IF( abs( tmp1 ).LT.pivmin )
219  \$ tmp1 = -pivmin
220  IF( tmp1.LE.zero )
221  \$ negcnt = negcnt + 1
222 *
223  DO 20 i = 2, n
224  tmp1 = d( i ) - e2( i-1 ) / tmp1 - mid
225  IF( abs( tmp1 ).LT.pivmin )
226  \$ tmp1 = -pivmin
227  IF( tmp1.LE.zero )
228  \$ negcnt = negcnt + 1
229  20 CONTINUE
230
231  IF(negcnt.GE.iw) THEN
232  right = mid
233  ELSE
234  left = mid
235  ENDIF
236  GOTO 10
237
238  30 CONTINUE
239 *
240 * Converged or maximum number of iterations reached
241 *
242  w = half * (left + right)
243  werr = half * abs( right - left )
244
245  RETURN
246 *
247 * End of DLARRK
248 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65

Here is the caller graph for this function: