191 SUBROUTINE slarrb( N, D, LLD, IFIRST, ILAST, RTOL1,
192 $ RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
193 $ PIVMIN, SPDIAM, TWIST, INFO )
200 INTEGER IFIRST, ILAST, INFO, N, OFFSET, TWIST
201 REAL PIVMIN, RTOL1, RTOL2, SPDIAM
205 REAL D( * ), LLD( * ), W( * ),
206 $ werr( * ), wgap( * ), work( * )
213 PARAMETER ( ZERO = 0.0e0, two = 2.0e0,
218 INTEGER I, I1, II, IP, ITER, K, NEGCNT, NEXT, NINT,
220 REAL BACK, CVRGD, GAP, LEFT, LGAP, MID, MNWDTH,
221 $ RGAP, RIGHT, TMP, WIDTH
229 INTRINSIC abs, max, min
241 maxitr = int( ( log( spdiam+pivmin )-log( pivmin ) ) /
243 mnwdth = two * pivmin
246 IF((r.LT.1).OR.(r.GT.n)) r = n
261 rgap = wgap( i1-offset )
265 left = w( ii ) - werr( ii )
266 right = w( ii ) + werr( ii )
269 gap = min( lgap, rgap )
278 negcnt = slaneg( n, d, lld, left, pivmin, r )
279 IF( negcnt.GT.i-1 )
THEN
291 negcnt = slaneg( n, d, lld, right, pivmin, r )
292 IF( negcnt.LT.i )
THEN
297 width = half*abs( left - right )
298 tmp = max( abs( left ), abs( right ) )
299 cvrgd = max(rtol1*gap,rtol2*tmp)
300 IF( width.LE.cvrgd .OR. width.LE.mnwdth )
THEN
307 IF((i.EQ.i1).AND.(i.LT.ilast)) i1 = i + 1
308 IF((prev.GE.i1).AND.(i.LE.ilast)) iwork( 2*prev-1 ) = i + 1
330 DO 100 ip = 1, olnint
335 IF(ii.GT.1) lgap = wgap( ii-1 )
336 gap = min( lgap, rgap )
340 mid = half*( left + right )
344 tmp = max( abs( left ), abs( right ) )
345 cvrgd = max(rtol1*gap,rtol2*tmp)
346 IF( ( width.LE.cvrgd ) .OR. ( width.LE.mnwdth ).OR.
347 $ ( iter.EQ.maxitr ) )
THEN
356 IF(prev.GE.i1) iwork( 2*prev-1 ) = next
365 negcnt = slaneg( n, d, lld, mid, pivmin, r )
366 IF( negcnt.LE.i-1 )
THEN
377 IF( ( nint.GT.0 ).AND.(iter.LE.maxitr) )
GO TO 80
381 DO 110 i = ifirst, ilast
385 IF( iwork( k-1 ).EQ.0 )
THEN
386 w( ii ) = half*( work( k-1 )+work( k ) )
387 werr( ii ) = work( k ) - w( ii )
391 DO 111 i = ifirst+1, ilast
394 wgap( ii-1 ) = max( zero,
395 $ w(ii) - werr(ii) - w( ii-1 ) - werr( ii-1 ))
subroutine slarrb(n, d, lld, ifirst, ilast, rtol1, rtol2, offset, w, wgap, werr, work, iwork, pivmin, spdiam, twist, info)
SLARRB provides limited bisection to locate eigenvalues for more accuracy.