231 SUBROUTINE dspevx( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
232 $ ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL,
240 CHARACTER JOBZ, RANGE, UPLO
241 INTEGER IL, INFO, IU, LDZ, M, N
242 DOUBLE PRECISION ABSTOL, VL, VU
245 INTEGER IFAIL( * ), IWORK( * )
246 DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( LDZ, * )
252 DOUBLE PRECISION ZERO, ONE
253 PARAMETER ( ZERO = 0.0d0, one = 1.0d0 )
256 LOGICAL ALLEIG, INDEIG, TEST, VALEIG, WANTZ
258 INTEGER I, IINFO, IMAX, INDD, INDE, INDEE,
259 $ indisp, indiwo, indtau, indwrk, iscale, itmp1,
261 DOUBLE PRECISION ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
262 $ SIGMA, SMLNUM, TMP1, VLL, VUU
266 DOUBLE PRECISION DLAMCH, DLANSP
267 EXTERNAL lsame, dlamch, dlansp
274 INTRINSIC max, min, sqrt
280 wantz = lsame( jobz,
'V' )
281 alleig = lsame( range,
'A' )
282 valeig = lsame( range,
'V' )
283 indeig = lsame( range,
'I' )
286 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
288 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
290 ELSE IF( .NOT.( lsame( uplo,
'L' ) .OR. lsame( uplo,
'U' ) ) )
293 ELSE IF( n.LT.0 )
THEN
297 IF( n.GT.0 .AND. vu.LE.vl )
299 ELSE IF( indeig )
THEN
300 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
302 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
308 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
313 CALL xerbla(
'DSPEVX', -info )
324 IF( alleig .OR. indeig )
THEN
328 IF( vl.LT.ap( 1 ) .AND. vu.GE.ap( 1 ) )
THEN
340 safmin = dlamch(
'Safe minimum' )
341 eps = dlamch(
'Precision' )
342 smlnum = safmin / eps
343 bignum = one / smlnum
344 rmin = sqrt( smlnum )
345 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
358 anrm = dlansp(
'M', uplo, n, ap, work )
359 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
362 ELSE IF( anrm.GT.rmax )
THEN
366 IF( iscale.EQ.1 )
THEN
367 CALL dscal( ( n*( n+1 ) ) / 2, sigma, ap, 1 )
369 $ abstll = abstol*sigma
382 CALL dsptrd( uplo, n, ap, work( indd ), work( inde ),
383 $ work( indtau ), iinfo )
391 IF (il.EQ.1 .AND. iu.EQ.n)
THEN
395 IF ((alleig .OR. test) .AND. (abstol.LE.zero))
THEN
396 CALL dcopy( n, work( indd ), 1, w, 1 )
398 IF( .NOT.wantz )
THEN
399 CALL dcopy( n-1, work( inde ), 1, work( indee ), 1 )
400 CALL dsterf( n, w, work( indee ), info )
402 CALL dopgtr( uplo, n, ap, work( indtau ), z, ldz,
403 $ work( indwrk ), iinfo )
404 CALL dcopy( n-1, work( inde ), 1, work( indee ), 1 )
405 CALL dsteqr( jobz, n, w, work( indee ), z, ldz,
406 $ work( indwrk ), info )
429 CALL dstebz( range, order, n, vll, vuu, il, iu, abstll,
430 $ work( indd ), work( inde ), m, nsplit, w,
431 $ iwork( 1 ), iwork( indisp ), work( indwrk ),
432 $ iwork( indiwo ), info )
435 CALL dstein( n, work( indd ), work( inde ), m, w,
436 $ iwork( 1 ), iwork( indisp ), z, ldz,
437 $ work( indwrk ), iwork( indiwo ), ifail, info )
442 CALL dopmtr(
'L', uplo,
'N', n, m, ap, work( indtau ), z, ldz,
443 $ work( indwrk ), iinfo )
449 IF( iscale.EQ.1 )
THEN
455 CALL dscal( imax, one / sigma, w, 1 )
466 IF( w( jj ).LT.tmp1 )
THEN
473 itmp1 = iwork( 1 + i-1 )
475 iwork( 1 + i-1 ) = iwork( 1 + j-1 )
477 iwork( 1 + j-1 ) = itmp1
478 CALL dswap( n, z( 1, i ), 1, z( 1, j ), 1 )
481 ifail( i ) = ifail( j )
subroutine xerbla(srname, info)
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dspevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
DSPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dsptrd(uplo, n, ap, d, e, tau, info)
DSPTRD
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 dsteqr(compz, n, d, e, z, ldz, work, info)
DSTEQR
subroutine dsterf(n, d, e, info)
DSTERF
subroutine dswap(n, dx, incx, dy, incy)
DSWAP
subroutine dopgtr(uplo, n, ap, tau, q, ldq, work, info)
DOPGTR
subroutine dopmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
DOPMTR