272 SUBROUTINE sstebz( RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E,
273 $ m, nsplit, w, iblock, isplit, work, iwork,
282 CHARACTER ORDER, RANGE
283 INTEGER IL, INFO, IU, M, N, NSPLIT
287 INTEGER IBLOCK( * ), ISPLIT( * ), IWORK( * )
288 REAL D( * ), E( * ), W( * ), WORK( * )
294 REAL ZERO, ONE, TWO, HALF
295 parameter ( zero = 0.0e0, one = 1.0e0, two = 2.0e0,
296 $ half = 1.0e0 / two )
298 parameter ( fudge = 2.1e0, relfac = 2.0e0 )
301 LOGICAL NCNVRG, TOOFEW
302 INTEGER IB, IBEGIN, IDISCL, IDISCU, IE, IEND, IINFO,
303 $ im, in, ioff, iorder, iout, irange, itmax,
304 $ itmp1, iw, iwoff, j, jb, jdisc, je, nb, nwl,
306 REAL ATOLI, BNORM, GL, GU, PIVMIN, RTOLI, SAFEMN,
307 $ tmp1, tmp2, tnorm, ulp, wkill, wl, wlu, wu, wul
316 EXTERNAL lsame, ilaenv, slamch
322 INTRINSIC abs, int, log, max, min, sqrt
330 IF( lsame( range,
'A' ) )
THEN
332 ELSE IF( lsame( range,
'V' ) )
THEN
334 ELSE IF( lsame( range,
'I' ) )
THEN
342 IF( lsame( order,
'B' ) )
THEN
344 ELSE IF( lsame( order,
'E' ) )
THEN
352 IF( irange.LE.0 )
THEN
354 ELSE IF( iorder.LE.0 )
THEN
356 ELSE IF( n.LT.0 )
THEN
358 ELSE IF( irange.EQ.2 )
THEN
359 IF( vl.GE.vu ) info = -5
360 ELSE IF( irange.EQ.3 .AND. ( il.LT.1 .OR. il.GT.max( 1, n ) ) )
363 ELSE IF( irange.EQ.3 .AND. ( iu.LT.min( n, il ) .OR. iu.GT.n ) )
369 CALL xerbla(
'SSTEBZ', -info )
387 IF( irange.EQ.3 .AND. il.EQ.1 .AND. iu.EQ.n )
394 safemn = slamch(
'S' )
397 nb = ilaenv( 1,
'SSTEBZ',
' ', n, -1, -1, -1 )
406 IF( irange.EQ.2 .AND. ( vl.GE.d( 1 ) .OR. vu.LT.d( 1 ) ) )
THEN
424 IF( abs( d( j )*d( j-1 ) )*ulp**2+safemn.GT.tmp1 )
THEN
425 isplit( nsplit ) = j - 1
430 pivmin = max( pivmin, tmp1 )
434 pivmin = pivmin*safemn
438 IF( irange.EQ.3 )
THEN
451 tmp2 = sqrt( work( j ) )
452 gu = max( gu, d( j )+tmp1+tmp2 )
453 gl = min( gl, d( j )-tmp1-tmp2 )
457 gu = max( gu, d( n )+tmp1 )
458 gl = min( gl, d( n )-tmp1 )
459 tnorm = max( abs( gl ), abs( gu ) )
460 gl = gl - fudge*tnorm*ulp*n - fudge*two*pivmin
461 gu = gu + fudge*tnorm*ulp*n + fudge*pivmin
465 itmax = int( ( log( tnorm+pivmin )-log( pivmin ) ) /
467 IF( abstol.LE.zero )
THEN
486 CALL slaebz( 3, itmax, n, 2, 2, nb, atoli, rtoli, pivmin, d, e,
487 $ work, iwork( 5 ), work( n+1 ), work( n+5 ), iout,
488 $ iwork, w, iblock, iinfo )
490 IF( iwork( 6 ).EQ.iu )
THEN
506 IF( nwl.LT.0 .OR. nwl.GE.n .OR. nwu.LT.1 .OR. nwu.GT.n )
THEN
514 tnorm = max( abs( d( 1 ) )+abs( e( 1 ) ),
515 $ abs( d( n ) )+abs( e( n-1 ) ) )
518 tnorm = max( tnorm, abs( d( j ) )+abs( e( j-1 ) )+
522 IF( abstol.LE.zero )
THEN
528 IF( irange.EQ.2 )
THEN
557 IF( irange.EQ.1 .OR. wl.GE.d( ibegin )-pivmin )
559 IF( irange.EQ.1 .OR. wu.GE.d( ibegin )-pivmin )
561 IF( irange.EQ.1 .OR. ( wl.LT.d( ibegin )-pivmin .AND. wu.GE.
562 $ d( ibegin )-pivmin ) )
THEN
578 DO 40 j = ibegin, iend - 1
580 gu = max( gu, d( j )+tmp1+tmp2 )
581 gl = min( gl, d( j )-tmp1-tmp2 )
585 gu = max( gu, d( iend )+tmp1 )
586 gl = min( gl, d( iend )-tmp1 )
587 bnorm = max( abs( gl ), abs( gu ) )
588 gl = gl - fudge*bnorm*ulp*in - fudge*pivmin
589 gu = gu + fudge*bnorm*ulp*in + fudge*pivmin
593 IF( abstol.LE.zero )
THEN
594 atoli = ulp*max( abs( gl ), abs( gu ) )
599 IF( irange.GT.1 )
THEN
615 CALL slaebz( 1, 0, in, in, 1, nb, atoli, rtoli, pivmin,
616 $ d( ibegin ), e( ibegin ), work( ibegin ),
617 $ idumma, work( n+1 ), work( n+2*in+1 ), im,
618 $ iwork, w( m+1 ), iblock( m+1 ), iinfo )
620 nwl = nwl + iwork( 1 )
621 nwu = nwu + iwork( in+1 )
622 iwoff = m - iwork( 1 )
626 itmax = int( ( log( gu-gl+pivmin )-log( pivmin ) ) /
628 CALL slaebz( 2, itmax, in, in, 1, nb, atoli, rtoli, pivmin,
629 $ d( ibegin ), e( ibegin ), work( ibegin ),
630 $ idumma, work( n+1 ), work( n+2*in+1 ), iout,
631 $ iwork, w( m+1 ), iblock( m+1 ), iinfo )
637 tmp1 = half*( work( j+n )+work( j+in+n ) )
641 IF( j.GT.iout-iinfo )
THEN
647 DO 50 je = iwork( j ) + 1 + iwoff,
648 $ iwork( j+in ) + iwoff
661 IF( irange.EQ.3 )
THEN
663 idiscl = il - 1 - nwl
666 IF( idiscl.GT.0 .OR. idiscu.GT.0 )
THEN
668 IF( w( je ).LE.wlu .AND. idiscl.GT.0 )
THEN
670 ELSE IF( w( je ).GE.wul .AND. idiscu.GT.0 )
THEN
675 iblock( im ) = iblock( je )
680 IF( idiscl.GT.0 .OR. idiscu.GT.0 )
THEN
692 IF( idiscl.GT.0 )
THEN
694 DO 100 jdisc = 1, idiscl
697 IF( iblock( je ).NE.0 .AND.
698 $ ( w( je ).LT.wkill .OR. iw.EQ.0 ) )
THEN
706 IF( idiscu.GT.0 )
THEN
709 DO 120 jdisc = 1, idiscu
712 IF( iblock( je ).NE.0 .AND.
713 $ ( w( je ).GT.wkill .OR. iw.EQ.0 ) )
THEN
723 IF( iblock( je ).NE.0 )
THEN
726 iblock( im ) = iblock( je )
731 IF( idiscl.LT.0 .OR. idiscu.LT.0 )
THEN
740 IF( iorder.EQ.1 .AND. nsplit.GT.1 )
THEN
745 IF( w( j ).LT.tmp1 )
THEN
754 iblock( ie ) = iblock( je )
subroutine sstebz(RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E, M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK, INFO)
SSTEBZ
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 xerbla(SRNAME, INFO)
XERBLA