325 SUBROUTINE dlarrd( RANGE, ORDER, N, VL, VU, IL, IU, GERS,
326 $ RELTOL, D, E, E2, PIVMIN, NSPLIT, ISPLIT,
327 $ M, W, WERR, WL, WU, IBLOCK, INDEXW,
328 $ WORK, IWORK, INFO )
335 CHARACTER ORDER, RANGE
336 INTEGER IL, INFO, IU, M, N, NSPLIT
337 DOUBLE PRECISION PIVMIN, RELTOL, VL, VU, WL, WU
340 INTEGER IBLOCK( * ), INDEXW( * ),
341 $ ISPLIT( * ), IWORK( * )
342 DOUBLE PRECISION D( * ), E( * ), E2( * ),
343 $ gers( * ), w( * ), werr( * ), work( * )
349 DOUBLE PRECISION ZERO, ONE, TWO, HALF, FUDGE
350 PARAMETER ( ZERO = 0.0d0, one = 1.0d0,
351 $ two = 2.0d0, half = one/two,
353 INTEGER ALLRNG, VALRNG, INDRNG
354 PARAMETER ( ALLRNG = 1, valrng = 2, indrng = 3 )
357 LOGICAL NCNVRG, TOOFEW
358 INTEGER I, IB, IBEGIN, IDISCL, IDISCU, IE, IEND, IINFO,
359 $ IM, IN, IOFF, IOUT, IRANGE, ITMAX, ITMP1,
360 $ itmp2, iw, iwoff, j, jblk, jdisc, je, jee, nb,
362 DOUBLE PRECISION ATOLI, EPS, GL, GU, RTOLI, TMP1, TMP2,
363 $ TNORM, UFLOW, WKILL, WLU, WUL
372 DOUBLE PRECISION DLAMCH
373 EXTERNAL lsame, ilaenv, dlamch
379 INTRINSIC abs, int, log, max, min
394 IF( lsame( range,
'A' ) )
THEN
396 ELSE IF( lsame( range,
'V' ) )
THEN
398 ELSE IF( lsame( range,
'I' ) )
THEN
406 IF( irange.LE.0 )
THEN
408 ELSE IF( .NOT.(lsame(order,
'B').OR.lsame(order,
'E')) )
THEN
410 ELSE IF( n.LT.0 )
THEN
412 ELSE IF( irange.EQ.valrng )
THEN
415 ELSE IF( irange.EQ.indrng .AND.
416 $ ( il.LT.1 .OR. il.GT.max( 1, n ) ) )
THEN
418 ELSE IF( irange.EQ.indrng .AND.
419 $ ( iu.LT.min( n, il ) .OR. iu.GT.n ) )
THEN
432 IF( irange.EQ.indrng .AND. il.EQ.1 .AND. iu.EQ.n ) irange = 1
436 uflow = dlamch(
'U' )
442 IF( (irange.EQ.allrng).OR.
443 $ ((irange.EQ.valrng).AND.(d(1).GT.vl).AND.(d(1).LE.vu)).OR.
444 $ ((irange.EQ.indrng).AND.(il.EQ.1).AND.(iu.EQ.1)) )
THEN
457 nb = ilaenv( 1,
'DSTEBZ',
' ', n, -1, -1, -1 )
464 gl = min( gl, gers( 2*i - 1))
465 gu = max( gu, gers(2*i) )
468 tnorm = max( abs( gl ), abs( gu ) )
469 gl = gl - fudge*tnorm*eps*n - fudge*two*pivmin
470 gu = gu + fudge*tnorm*eps*n + fudge*two*pivmin
483 atoli = fudge*two*uflow + fudge*two*pivmin
485 IF( irange.EQ.indrng )
THEN
490 itmax = int( ( log( tnorm+pivmin )-log( pivmin ) ) /
505 CALL dlaebz( 3, itmax, n, 2, 2, nb, atoli, rtoli, pivmin,
506 $ d, e, e2, iwork( 5 ), work( n+1 ), work( n+5 ), iout,
507 $ iwork, w, iblock, iinfo )
508 IF( iinfo .NE. 0 )
THEN
513 IF( iwork( 6 ).EQ.iu )
THEN
530 IF( nwl.LT.0 .OR. nwl.GE.n .OR. nwu.LT.1 .OR. nwu.GT.n )
THEN
535 ELSEIF( irange.EQ.valrng )
THEN
539 ELSEIF( irange.EQ.allrng )
THEN
555 DO 70 jblk = 1, nsplit
558 iend = isplit( jblk )
563 IF( wl.GE.d( ibegin )-pivmin )
565 IF( wu.GE.d( ibegin )-pivmin )
567 IF( irange.EQ.allrng .OR.
568 $ ( wl.LT.d( ibegin )-pivmin
569 $ .AND. wu.GE. d( ibegin )-pivmin ) )
THEN
633 DO 40 j = ibegin, iend
634 gl = min( gl, gers( 2*j - 1))
635 gu = max( gu, gers(2*j) )
643 gl = gl - fudge*tnorm*eps*in - fudge*pivmin
644 gu = gu + fudge*tnorm*eps*in + fudge*pivmin
646 IF( irange.GT.1 )
THEN
663 CALL dlaebz( 1, 0, in, in, 1, nb, atoli, rtoli, pivmin,
664 $ d( ibegin ), e( ibegin ), e2( ibegin ),
665 $ idumma, work( n+1 ), work( n+2*in+1 ), im,
666 $ iwork, w( m+1 ), iblock( m+1 ), iinfo )
667 IF( iinfo .NE. 0 )
THEN
672 nwl = nwl + iwork( 1 )
673 nwu = nwu + iwork( in+1 )
674 iwoff = m - iwork( 1 )
677 itmax = int( ( log( gu-gl+pivmin )-log( pivmin ) ) /
679 CALL dlaebz( 2, itmax, in, in, 1, nb, atoli, rtoli, pivmin,
680 $ d( ibegin ), e( ibegin ), e2( ibegin ),
681 $ idumma, work( n+1 ), work( n+2*in+1 ), iout,
682 $ iwork, w( m+1 ), iblock( m+1 ), iinfo )
683 IF( iinfo .NE. 0 )
THEN
693 tmp1 = half*( work( j+n )+work( j+in+n ) )
695 tmp2 = half*abs( work( j+n )-work( j+in+n ) )
696 IF( j.GT.iout-iinfo )
THEN
703 DO 50 je = iwork( j ) + 1 + iwoff,
704 $ iwork( j+in ) + iwoff
707 indexw( je ) = je - iwoff
718 IF( irange.EQ.indrng )
THEN
719 idiscl = il - 1 - nwl
722 IF( idiscl.GT.0 )
THEN
727 IF( w( je ).LE.wlu .AND. idiscl.GT.0 )
THEN
732 werr( im ) = werr( je )
733 indexw( im ) = indexw( je )
734 iblock( im ) = iblock( je )
739 IF( idiscu.GT.0 )
THEN
744 IF( w( je ).GE.wul .AND. idiscu.GT.0 )
THEN
749 werr( im ) = werr( je )
750 indexw( im ) = indexw( je )
751 iblock( im ) = iblock( je )
758 werr( jee ) = werr( je )
759 indexw( jee ) = indexw( je )
760 iblock( jee ) = iblock( je )
765 IF( idiscl.GT.0 .OR. idiscu.GT.0 )
THEN
772 IF( idiscl.GT.0 )
THEN
774 DO 100 jdisc = 1, idiscl
777 IF( iblock( je ).NE.0 .AND.
778 $ ( w( je ).LT.wkill .OR. iw.EQ.0 ) )
THEN
786 IF( idiscu.GT.0 )
THEN
788 DO 120 jdisc = 1, idiscu
791 IF( iblock( je ).NE.0 .AND.
792 $ ( w( je ).GE.wkill .OR. iw.EQ.0 ) )
THEN
803 IF( iblock( je ).NE.0 )
THEN
806 werr( im ) = werr( je )
807 indexw( im ) = indexw( je )
808 iblock( im ) = iblock( je )
813 IF( idiscl.LT.0 .OR. idiscu.LT.0 )
THEN
818 IF(( irange.EQ.allrng .AND. m.NE.n ).OR.
819 $ ( irange.EQ.indrng .AND. m.NE.iu-il+1 ) )
THEN
827 IF( lsame(order,
'E') .AND. nsplit.GT.1 )
THEN
832 IF( w( j ).LT.tmp1 )
THEN
842 werr( ie ) = werr( je )
843 iblock( ie ) = iblock( je )
844 indexw( ie ) = indexw( je )
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 ...
subroutine dlarrd(range, order, n, vl, vu, il, iu, gers, reltol, d, e, e2, pivmin, nsplit, isplit, m, w, werr, wl, wu, iblock, indexw, work, iwork, info)
DLARRD computes the eigenvalues of a symmetric tridiagonal matrix to suitable accuracy.