272 SUBROUTINE dstebz( 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
284 DOUBLE PRECISION ABSTOL, VL, VU
287 INTEGER IBLOCK( * ), ISPLIT( * ), IWORK( * )
288 DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * )
294 DOUBLE PRECISION ZERO, ONE, TWO, HALF
295 parameter ( zero = 0.0d0, one = 1.0d0, two = 2.0d0,
296 $ half = 1.0d0 / two )
297 DOUBLE PRECISION FUDGE, RELFAC
298 parameter ( fudge = 2.1d0, relfac = 2.0d0 )
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 DOUBLE PRECISION ATOLI, BNORM, GL, GU, PIVMIN, RTOLI, SAFEMN,
307 $ tmp1, tmp2, tnorm, ulp, wkill, wl, wlu, wu, wul
315 DOUBLE PRECISION DLAMCH
316 EXTERNAL lsame, ilaenv, dlamch
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
361 ELSE IF( irange.EQ.3 .AND. ( il.LT.1 .OR. il.GT.max( 1, n ) ) )
364 ELSE IF( irange.EQ.3 .AND. ( iu.LT.min( n, il ) .OR. iu.GT.n ) )
370 CALL xerbla(
'DSTEBZ', -info )
388 IF( irange.EQ.3 .AND. il.EQ.1 .AND. iu.EQ.n )
395 safemn = dlamch(
'S' )
398 nb = ilaenv( 1,
'DSTEBZ',
' ', n, -1, -1, -1 )
407 IF( irange.EQ.2 .AND. ( vl.GE.d( 1 ) .OR. vu.LT.d( 1 ) ) )
THEN
425 IF( abs( d( j )*d( j-1 ) )*ulp**2+safemn.GT.tmp1 )
THEN
426 isplit( nsplit ) = j - 1
431 pivmin = max( pivmin, tmp1 )
435 pivmin = pivmin*safemn
439 IF( irange.EQ.3 )
THEN
452 tmp2 = sqrt( work( j ) )
453 gu = max( gu, d( j )+tmp1+tmp2 )
454 gl = min( gl, d( j )-tmp1-tmp2 )
458 gu = max( gu, d( n )+tmp1 )
459 gl = min( gl, d( n )-tmp1 )
460 tnorm = max( abs( gl ), abs( gu ) )
461 gl = gl - fudge*tnorm*ulp*n - fudge*two*pivmin
462 gu = gu + fudge*tnorm*ulp*n + fudge*pivmin
466 itmax = int( ( log( tnorm+pivmin )-log( pivmin ) ) /
468 IF( abstol.LE.zero )
THEN
487 CALL dlaebz( 3, itmax, n, 2, 2, nb, atoli, rtoli, pivmin, d, e,
488 $ work, iwork( 5 ), work( n+1 ), work( n+5 ), iout,
489 $ iwork, w, iblock, iinfo )
491 IF( iwork( 6 ).EQ.iu )
THEN
507 IF( nwl.LT.0 .OR. nwl.GE.n .OR. nwu.LT.1 .OR. nwu.GT.n )
THEN
515 tnorm = max( abs( d( 1 ) )+abs( e( 1 ) ),
516 $ abs( d( n ) )+abs( e( n-1 ) ) )
519 tnorm = max( tnorm, abs( d( j ) )+abs( e( j-1 ) )+
523 IF( abstol.LE.zero )
THEN
529 IF( irange.EQ.2 )
THEN
558 IF( irange.EQ.1 .OR. wl.GE.d( ibegin )-pivmin )
560 IF( irange.EQ.1 .OR. wu.GE.d( ibegin )-pivmin )
562 IF( irange.EQ.1 .OR. ( wl.LT.d( ibegin )-pivmin .AND. wu.GE.
563 $ d( ibegin )-pivmin ) )
THEN
579 DO 40 j = ibegin, iend - 1
581 gu = max( gu, d( j )+tmp1+tmp2 )
582 gl = min( gl, d( j )-tmp1-tmp2 )
586 gu = max( gu, d( iend )+tmp1 )
587 gl = min( gl, d( iend )-tmp1 )
588 bnorm = max( abs( gl ), abs( gu ) )
589 gl = gl - fudge*bnorm*ulp*in - fudge*pivmin
590 gu = gu + fudge*bnorm*ulp*in + fudge*pivmin
594 IF( abstol.LE.zero )
THEN
595 atoli = ulp*max( abs( gl ), abs( gu ) )
600 IF( irange.GT.1 )
THEN
616 CALL dlaebz( 1, 0, in, in, 1, nb, atoli, rtoli, pivmin,
617 $ d( ibegin ), e( ibegin ), work( ibegin ),
618 $ idumma, work( n+1 ), work( n+2*in+1 ), im,
619 $ iwork, w( m+1 ), iblock( m+1 ), iinfo )
621 nwl = nwl + iwork( 1 )
622 nwu = nwu + iwork( in+1 )
623 iwoff = m - iwork( 1 )
627 itmax = int( ( log( gu-gl+pivmin )-log( pivmin ) ) /
629 CALL dlaebz( 2, itmax, in, in, 1, nb, atoli, rtoli, pivmin,
630 $ d( ibegin ), e( ibegin ), work( ibegin ),
631 $ idumma, work( n+1 ), work( n+2*in+1 ), iout,
632 $ iwork, w( m+1 ), iblock( m+1 ), iinfo )
638 tmp1 = half*( work( j+n )+work( j+in+n ) )
642 IF( j.GT.iout-iinfo )
THEN
648 DO 50 je = iwork( j ) + 1 + iwoff,
649 $ iwork( j+in ) + iwoff
662 IF( irange.EQ.3 )
THEN
664 idiscl = il - 1 - nwl
667 IF( idiscl.GT.0 .OR. idiscu.GT.0 )
THEN
669 IF( w( je ).LE.wlu .AND. idiscl.GT.0 )
THEN
671 ELSE IF( w( je ).GE.wul .AND. idiscu.GT.0 )
THEN
676 iblock( im ) = iblock( je )
681 IF( idiscl.GT.0 .OR. idiscu.GT.0 )
THEN
693 IF( idiscl.GT.0 )
THEN
695 DO 100 jdisc = 1, idiscl
698 IF( iblock( je ).NE.0 .AND.
699 $ ( w( je ).LT.wkill .OR. iw.EQ.0 ) )
THEN
707 IF( idiscu.GT.0 )
THEN
710 DO 120 jdisc = 1, idiscu
713 IF( iblock( je ).NE.0 .AND.
714 $ ( w( je ).GT.wkill .OR. iw.EQ.0 ) )
THEN
724 IF( iblock( je ).NE.0 )
THEN
727 iblock( im ) = iblock( je )
732 IF( idiscl.LT.0 .OR. idiscu.LT.0 )
THEN
741 IF( iorder.EQ.1 .AND. nsplit.GT.1 )
THEN
746 IF( w( j ).LT.tmp1 )
THEN
755 iblock( ie ) = iblock( je )
subroutine dstebz(RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E, M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK, INFO)
DSTEBZ
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dlaebz(IJOB, NITMAX, N, MMAX, MINP, NBMIN, ABSTOL, RELTOL, PIVMIN, D, E, E2, NVAL, AB, C, MOUT, NAB, WORK, IWORK, INFO)
DLAEBZ computes the number of eigenvalues of a real symmetric tridiagonal matrix which are less than ...