237 SUBROUTINE zhpevx( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
238 $ ABSTOL, M, W, Z, LDZ, WORK, RWORK, IWORK,
246 CHARACTER JOBZ, RANGE, UPLO
247 INTEGER IL, INFO, IU, LDZ, M, N
248 DOUBLE PRECISION ABSTOL, VL, VU
251 INTEGER IFAIL( * ), IWORK( * )
252 DOUBLE PRECISION RWORK( * ), W( * )
253 COMPLEX*16 AP( * ), WORK( * ), Z( LDZ, * )
259 DOUBLE PRECISION ZERO, ONE
260 PARAMETER ( ZERO = 0.0d0, one = 1.0d0 )
262 parameter( cone = ( 1.0d0, 0.0d0 ) )
265 LOGICAL ALLEIG, INDEIG, TEST, VALEIG, WANTZ
267 INTEGER I, IINFO, IMAX, INDD, INDE, INDEE,
268 $ indisp, indiwk, indrwk, indtau, indwrk, iscale,
269 $ itmp1, j, jj, nsplit
270 DOUBLE PRECISION ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
271 $ SIGMA, SMLNUM, TMP1, VLL, VUU
275 DOUBLE PRECISION DLAMCH, ZLANHP
276 EXTERNAL lsame, dlamch, zlanhp
283 INTRINSIC dble, max, min, sqrt
289 wantz = lsame( jobz,
'V' )
290 alleig = lsame( range,
'A' )
291 valeig = lsame( range,
'V' )
292 indeig = lsame( range,
'I' )
295 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
297 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
299 ELSE IF( .NOT.( lsame( uplo,
'L' ) .OR. lsame( uplo,
'U' ) ) )
302 ELSE IF( n.LT.0 )
THEN
306 IF( n.GT.0 .AND. vu.LE.vl )
308 ELSE IF( indeig )
THEN
309 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
311 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
317 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
322 CALL xerbla(
'ZHPEVX', -info )
333 IF( alleig .OR. indeig )
THEN
335 w( 1 ) = dble( ap( 1 ) )
337 IF( vl.LT.dble( ap( 1 ) ) .AND. vu.GE.dble( ap( 1 ) ) )
THEN
339 w( 1 ) = dble( ap( 1 ) )
349 safmin = dlamch(
'Safe minimum' )
350 eps = dlamch(
'Precision' )
351 smlnum = safmin / eps
352 bignum = one / smlnum
353 rmin = sqrt( smlnum )
354 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
367 anrm = zlanhp(
'M', uplo, n, ap, rwork )
368 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
371 ELSE IF( anrm.GT.rmax )
THEN
375 IF( iscale.EQ.1 )
THEN
376 CALL zdscal( ( n*( n+1 ) ) / 2, sigma, ap, 1 )
378 $ abstll = abstol*sigma
392 CALL zhptrd( uplo, n, ap, rwork( indd ), rwork( inde ),
393 $ work( indtau ), iinfo )
401 IF (il.EQ.1 .AND. iu.EQ.n)
THEN
405 IF ((alleig .OR. test) .AND. (abstol.LE.zero))
THEN
406 CALL dcopy( n, rwork( indd ), 1, w, 1 )
408 IF( .NOT.wantz )
THEN
409 CALL dcopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
410 CALL dsterf( n, w, rwork( indee ), info )
412 CALL zupgtr( uplo, n, ap, work( indtau ), z, ldz,
413 $ work( indwrk ), iinfo )
414 CALL dcopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
415 CALL zsteqr( jobz, n, w, rwork( indee ), z, ldz,
416 $ rwork( indrwk ), info )
439 CALL dstebz( range, order, n, vll, vuu, il, iu, abstll,
440 $ rwork( indd ), rwork( inde ), m, nsplit, w,
441 $ iwork( 1 ), iwork( indisp ), rwork( indrwk ),
442 $ iwork( indiwk ), info )
445 CALL zstein( n, rwork( indd ), rwork( inde ), m, w,
446 $ iwork( 1 ), iwork( indisp ), z, ldz,
447 $ rwork( indrwk ), iwork( indiwk ), ifail, info )
453 CALL zupmtr(
'L', uplo,
'N', n, m, ap, work( indtau ), z, ldz,
454 $ work( indwrk ), iinfo )
460 IF( iscale.EQ.1 )
THEN
466 CALL dscal( imax, one / sigma, w, 1 )
477 IF( w( jj ).LT.tmp1 )
THEN
484 itmp1 = iwork( 1 + i-1 )
486 iwork( 1 + i-1 ) = iwork( 1 + j-1 )
488 iwork( 1 + j-1 ) = itmp1
489 CALL zswap( n, z( 1, i ), 1, z( 1, j ), 1 )
492 ifail( i ) = ifail( j )
subroutine xerbla(srname, info)
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine zhpevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
ZHPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine zhptrd(uplo, n, ap, d, e, tau, info)
ZHPTRD
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine zdscal(n, da, zx, incx)
ZDSCAL
subroutine dstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
DSTEBZ
subroutine zstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
ZSTEIN
subroutine zsteqr(compz, n, d, e, z, ldz, work, info)
ZSTEQR
subroutine dsterf(n, d, e, info)
DSTERF
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP
subroutine zupgtr(uplo, n, ap, tau, q, ldq, work, info)
ZUPGTR
subroutine zupmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
ZUPMTR