301 SUBROUTINE dstevr( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
302 $ M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
310 CHARACTER JOBZ, RANGE
311 INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
312 DOUBLE PRECISION ABSTOL, VL, VU
315 INTEGER ISUPPZ( * ), IWORK( * )
316 DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
322 DOUBLE PRECISION ZERO, ONE, TWO
323 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0, two = 2.0d+0 )
326 LOGICAL ALLEIG, INDEIG, TEST, LQUERY, VALEIG, WANTZ,
329 INTEGER I, IEEEOK, IMAX, INDIBL, INDIFL, INDISP,
330 $ indiwo, iscale, itmp1, j, jj, liwmin, lwmin,
332 DOUBLE PRECISION BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA, SMLNUM,
333 $ TMP1, TNRM, VLL, VUU
338 DOUBLE PRECISION DLAMCH, DLANST
339 EXTERNAL lsame, ilaenv, dlamch, dlanst
346 INTRINSIC max, min, sqrt
353 ieeeok = ilaenv( 10,
'DSTEVR',
'N', 1, 2, 3, 4 )
355 wantz = lsame( jobz,
'V' )
356 alleig = lsame( range,
'A' )
357 valeig = lsame( range,
'V' )
358 indeig = lsame( range,
'I' )
360 lquery = ( ( lwork.EQ.-1 ) .OR. ( liwork.EQ.-1 ) )
361 lwmin = max( 1, 20*n )
362 liwmin = max( 1, 10*n )
366 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
368 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
370 ELSE IF( n.LT.0 )
THEN
374 IF( n.GT.0 .AND. vu.LE.vl )
376 ELSE IF( indeig )
THEN
377 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
379 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
385 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
394 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
396 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
402 CALL xerbla(
'DSTEVR', -info )
404 ELSE IF( lquery )
THEN
415 IF( alleig .OR. indeig )
THEN
419 IF( vl.LT.d( 1 ) .AND. vu.GE.d( 1 ) )
THEN
431 safmin = dlamch(
'Safe minimum' )
432 eps = dlamch(
'Precision' )
433 smlnum = safmin / eps
434 bignum = one / smlnum
435 rmin = sqrt( smlnum )
436 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
447 tnrm = dlanst(
'M', n, d, e )
448 IF( tnrm.GT.zero .AND. tnrm.LT.rmin )
THEN
451 ELSE IF( tnrm.GT.rmax )
THEN
455 IF( iscale.EQ.1 )
THEN
456 CALL dscal( n, sigma, d, 1 )
457 CALL dscal( n-1, sigma, e( 1 ), 1 )
488 IF( il.EQ.1 .AND. iu.EQ.n )
THEN
492 IF( ( alleig .OR. test ) .AND. ieeeok.EQ.1 )
THEN
493 CALL dcopy( n-1, e( 1 ), 1, work( 1 ), 1 )
494 IF( .NOT.wantz )
THEN
495 CALL dcopy( n, d, 1, w, 1 )
496 CALL dsterf( n, w, work, info )
498 CALL dcopy( n, d, 1, work( n+1 ), 1 )
499 IF (abstol .LE. two*n*eps)
THEN
504 CALL dstemr( jobz,
'A', n, work( n+1 ), work, vl, vu, il,
505 $ iu, m, w, z, ldz, n, isuppz, tryrac,
506 $ work( 2*n+1 ), lwork-2*n, iwork, liwork, info )
524 CALL dstebz( range, order, n, vll, vuu, il, iu, abstol, d, e, m,
525 $ nsplit, w, iwork( indibl ), iwork( indisp ), work,
526 $ iwork( indiwo ), info )
529 CALL dstein( n, d, e, m, w, iwork( indibl ), iwork( indisp ),
530 $ z, ldz, work, iwork( indiwo ), iwork( indifl ),
537 IF( iscale.EQ.1 )
THEN
543 CALL dscal( imax, one / sigma, w, 1 )
554 IF( w( jj ).LT.tmp1 )
THEN
563 iwork( i ) = iwork( j )
566 CALL dswap( n, z( 1, i ), 1, z( 1, j ), 1 )
subroutine xerbla(srname, info)
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
DSTEBZ
subroutine dstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
DSTEIN
subroutine dstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info)
DSTEMR
subroutine dsterf(n, d, e, info)
DSTERF
subroutine dstevr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
DSTEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dswap(n, dx, incx, dy, incy)
DSWAP