270 SUBROUTINE sstebz( RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E,
271 $ M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK,
279 CHARACTER ORDER, RANGE
280 INTEGER IL, INFO, IU, M, N, NSPLIT
284 INTEGER IBLOCK( * ), ISPLIT( * ), IWORK( * )
285 REAL D( * ), E( * ), W( * ), WORK( * )
291 REAL ZERO, ONE, TWO, HALF
292 PARAMETER ( ZERO = 0.0e0, one = 1.0e0, two = 2.0e0,
293 $ half = 1.0e0 / two )
295 PARAMETER ( FUDGE = 2.1e0, relfac = 2.0e0 )
298 LOGICAL NCNVRG, TOOFEW
299 INTEGER IB, IBEGIN, IDISCL, IDISCU, IE, IEND, IINFO,
300 $ im, in, ioff, iorder, iout, irange, itmax,
301 $ itmp1, iw, iwoff, j, jb, jdisc, je, nb, nwl,
303 REAL ATOLI, BNORM, GL, GU, PIVMIN, RTOLI, SAFEMN,
304 $ TMP1, TMP2, TNORM, ULP, WKILL, WL, WLU, WU, WUL
313 EXTERNAL lsame, ilaenv, slamch
319 INTRINSIC abs, int, log, max, min, sqrt
327 IF( lsame( range,
'A' ) )
THEN
329 ELSE IF( lsame( range,
'V' ) )
THEN
331 ELSE IF( lsame( range,
'I' ) )
THEN
339 IF( lsame( order,
'B' ) )
THEN
341 ELSE IF( lsame( order,
'E' ) )
THEN
349 IF( irange.LE.0 )
THEN
351 ELSE IF( iorder.LE.0 )
THEN
353 ELSE IF( n.LT.0 )
THEN
355 ELSE IF( irange.EQ.2 )
THEN
356 IF( vl.GE.vu ) info = -5
357 ELSE IF( irange.EQ.3 .AND. ( il.LT.1 .OR. il.GT.max( 1, n ) ) )
360 ELSE IF( irange.EQ.3 .AND. ( iu.LT.min( n, il ) .OR. iu.GT.n ) )
366 CALL xerbla(
'SSTEBZ', -info )
384 IF( irange.EQ.3 .AND. il.EQ.1 .AND. iu.EQ.n )
391 safemn = slamch(
'S' )
394 nb = ilaenv( 1,
'SSTEBZ',
' ', n, -1, -1, -1 )
403 IF( irange.EQ.2 .AND. ( vl.GE.d( 1 ) .OR. vu.LT.d( 1 ) ) )
THEN
421 IF( abs( d( j )*d( j-1 ) )*ulp**2+safemn.GT.tmp1 )
THEN
422 isplit( nsplit ) = j - 1
427 pivmin = max( pivmin, tmp1 )
431 pivmin = pivmin*safemn
435 IF( irange.EQ.3 )
THEN
448 tmp2 = sqrt( work( j ) )
449 gu = max( gu, d( j )+tmp1+tmp2 )
450 gl = min( gl, d( j )-tmp1-tmp2 )
454 gu = max( gu, d( n )+tmp1 )
455 gl = min( gl, d( n )-tmp1 )
456 tnorm = max( abs( gl ), abs( gu ) )
457 gl = gl - fudge*tnorm*ulp*n - fudge*two*pivmin
458 gu = gu + fudge*tnorm*ulp*n + fudge*pivmin
462 itmax = int( ( log( tnorm+pivmin )-log( pivmin ) ) /
464 IF( abstol.LE.zero )
THEN
483 CALL slaebz( 3, itmax, n, 2, 2, nb, atoli, rtoli, pivmin, d, e,
484 $ work, iwork( 5 ), work( n+1 ), work( n+5 ), iout,
485 $ iwork, w, iblock, iinfo )
487 IF( iwork( 6 ).EQ.iu )
THEN
503 IF( nwl.LT.0 .OR. nwl.GE.n .OR. nwu.LT.1 .OR. nwu.GT.n )
THEN
511 tnorm = max( abs( d( 1 ) )+abs( e( 1 ) ),
512 $ abs( d( n ) )+abs( e( n-1 ) ) )
515 tnorm = max( tnorm, abs( d( j ) )+abs( e( j-1 ) )+
519 IF( abstol.LE.zero )
THEN
525 IF( irange.EQ.2 )
THEN
554 IF( irange.EQ.1 .OR. wl.GE.d( ibegin )-pivmin )
556 IF( irange.EQ.1 .OR. wu.GE.d( ibegin )-pivmin )
558 IF( irange.EQ.1 .OR. ( wl.LT.d( ibegin )-pivmin .AND. wu.GE.
559 $ d( ibegin )-pivmin ) )
THEN
575 DO 40 j = ibegin, iend - 1
577 gu = max( gu, d( j )+tmp1+tmp2 )
578 gl = min( gl, d( j )-tmp1-tmp2 )
582 gu = max( gu, d( iend )+tmp1 )
583 gl = min( gl, d( iend )-tmp1 )
584 bnorm = max( abs( gl ), abs( gu ) )
585 gl = gl - fudge*bnorm*ulp*in - fudge*pivmin
586 gu = gu + fudge*bnorm*ulp*in + fudge*pivmin
590 IF( abstol.LE.zero )
THEN
591 atoli = ulp*max( abs( gl ), abs( gu ) )
596 IF( irange.GT.1 )
THEN
612 CALL slaebz( 1, 0, in, in, 1, nb, atoli, rtoli, pivmin,
613 $ d( ibegin ), e( ibegin ), work( ibegin ),
614 $ idumma, work( n+1 ), work( n+2*in+1 ), im,
615 $ iwork, w( m+1 ), iblock( m+1 ), iinfo )
617 nwl = nwl + iwork( 1 )
618 nwu = nwu + iwork( in+1 )
619 iwoff = m - iwork( 1 )
623 itmax = int( ( log( gu-gl+pivmin )-log( pivmin ) ) /
625 CALL slaebz( 2, itmax, in, in, 1, nb, atoli, rtoli, pivmin,
626 $ d( ibegin ), e( ibegin ), work( ibegin ),
627 $ idumma, work( n+1 ), work( n+2*in+1 ), iout,
628 $ iwork, w( m+1 ), iblock( m+1 ), iinfo )
634 tmp1 = half*( work( j+n )+work( j+in+n ) )
638 IF( j.GT.iout-iinfo )
THEN
644 DO 50 je = iwork( j ) + 1 + iwoff,
645 $ iwork( j+in ) + iwoff
658 IF( irange.EQ.3 )
THEN
660 idiscl = il - 1 - nwl
663 IF( idiscl.GT.0 .OR. idiscu.GT.0 )
THEN
665 IF( w( je ).LE.wlu .AND. idiscl.GT.0 )
THEN
667 ELSE IF( w( je ).GE.wul .AND. idiscu.GT.0 )
THEN
672 iblock( im ) = iblock( je )
677 IF( idiscl.GT.0 .OR. idiscu.GT.0 )
THEN
689 IF( idiscl.GT.0 )
THEN
691 DO 100 jdisc = 1, idiscl
694 IF( iblock( je ).NE.0 .AND.
695 $ ( w( je ).LT.wkill .OR. iw.EQ.0 ) )
THEN
703 IF( idiscu.GT.0 )
THEN
706 DO 120 jdisc = 1, idiscu
709 IF( iblock( je ).NE.0 .AND.
710 $ ( w( je ).GT.wkill .OR. iw.EQ.0 ) )
THEN
720 IF( iblock( je ).NE.0 )
THEN
723 iblock( im ) = iblock( je )
728 IF( idiscl.LT.0 .OR. idiscu.LT.0 )
THEN
737 IF( iorder.EQ.1 .AND. nsplit.GT.1 )
THEN
742 IF( w( j ).LT.tmp1 )
THEN
751 iblock( ie ) = iblock( je )
subroutine xerbla(srname, info)
subroutine slaebz(ijob, nitmax, n, mmax, minp, nbmin, abstol, reltol, pivmin, d, e, e2, nval, ab, c, mout, nab, work, iwork, info)
SLAEBZ computes the number of eigenvalues of a real symmetric tridiagonal matrix which are less than ...
subroutine sstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
SSTEBZ