142 $ D, E2, PIVMIN, RELTOL, W, WERR, INFO)
150 DOUBLE PRECISION PIVMIN, RELTOL, GL, GU, W, WERR
153 DOUBLE PRECISION D( * ), E2( * )
159 DOUBLE PRECISION FUDGE, HALF, TWO, ZERO
160 parameter( half = 0.5d0, two = 2.0d0,
161 $ fudge = two, zero = 0.0d0 )
164 INTEGER I, IT, ITMAX, NEGCNT
165 DOUBLE PRECISION ATOLI, EPS, LEFT, MID, RIGHT, RTOLI, TMP1,
169 DOUBLE PRECISION DLAMCH
173 INTRINSIC abs, int, log, max
187 tnorm = max( abs( gl ), abs( gu ) )
189 atoli = fudge*two*pivmin
191 itmax = int( ( log( tnorm+pivmin )-log( pivmin ) ) /
196 left = gl - fudge*tnorm*eps*n - fudge*two*pivmin
197 right = gu + fudge*tnorm*eps*n + fudge*two*pivmin
204 tmp1 = abs( right - left )
205 tmp2 = max( abs(right), abs(left) )
206 IF( tmp1.LT.max( atoli, pivmin, rtoli*tmp2 ) )
THEN
217 mid = half * (left + right)
220 IF( abs( tmp1 ).LT.pivmin )
223 $ negcnt = negcnt + 1
226 tmp1 = d( i ) - e2( i-1 ) / tmp1 - mid
227 IF( abs( tmp1 ).LT.pivmin )
230 $ negcnt = negcnt + 1
233 IF(negcnt.GE.iw)
THEN
244 w = half * (left + right)
245 werr = half * abs( right - left )
subroutine dlarrk(n, iw, gl, gu, d, e2, pivmin, reltol, w, werr, info)
DLARRK computes one eigenvalue of a symmetric tridiagonal matrix T to suitable accuracy.