144 $ D, E2, PIVMIN, RELTOL, W, WERR, INFO)
152 DOUBLE PRECISION PIVMIN, RELTOL, GL, GU, W, WERR
155 DOUBLE PRECISION D( * ), E2( * )
161 DOUBLE PRECISION FUDGE, HALF, TWO, ZERO
162 parameter( half = 0.5d0, two = 2.0d0,
163 $ fudge = two, zero = 0.0d0 )
166 INTEGER I, IT, ITMAX, NEGCNT
167 DOUBLE PRECISION ATOLI, EPS, LEFT, MID, RIGHT, RTOLI, TMP1,
171 DOUBLE PRECISION DLAMCH
175 INTRINSIC abs, int, log, max
189 tnorm = max( abs( gl ), abs( gu ) )
191 atoli = fudge*two*pivmin
193 itmax = int( ( log( tnorm+pivmin )-log( pivmin ) ) /
198 left = gl - fudge*tnorm*eps*n - fudge*two*pivmin
199 right = gu + fudge*tnorm*eps*n + fudge*two*pivmin
206 tmp1 = abs( right - left )
207 tmp2 = max( abs(right), abs(left) )
208 IF( tmp1.LT.max( atoli, pivmin, rtoli*tmp2 ) )
THEN
219 mid = half * (left + right)
222 IF( abs( tmp1 ).LT.pivmin )
225 $ negcnt = negcnt + 1
228 tmp1 = d( i ) - e2( i-1 ) / tmp1 - mid
229 IF( abs( tmp1 ).LT.pivmin )
232 $ negcnt = negcnt + 1
235 IF(negcnt.GE.iw)
THEN
246 w = half * (left + right)
247 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.