134 SUBROUTINE chpev( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, RWORK,
146 REAL RWORK( * ), W( * )
147 COMPLEX AP( * ), WORK( * ), Z( LDZ, * )
154 parameter( zero = 0.0e0, one = 1.0e0 )
158 INTEGER IINFO, IMAX, INDE, INDRWK, INDTAU, INDWRK,
160 REAL ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
166 EXTERNAL lsame, clanhp, slamch
180 wantz = lsame( jobz,
'V' )
183 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
185 ELSE IF( .NOT.( lsame( uplo,
'L' ) .OR.
186 $ lsame( uplo,
'U' ) ) )
189 ELSE IF( n.LT.0 )
THEN
191 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
196 CALL xerbla(
'CHPEV ', -info )
206 w( 1 ) = real( ap( 1 ) )
215 safmin = slamch(
'Safe minimum' )
216 eps = slamch(
'Precision' )
217 smlnum = safmin / eps
218 bignum = one / smlnum
219 rmin = sqrt( smlnum )
220 rmax = sqrt( bignum )
224 anrm = clanhp(
'M', uplo, n, ap, rwork )
226 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
229 ELSE IF( anrm.GT.rmax )
THEN
233 IF( iscale.EQ.1 )
THEN
234 CALL csscal( ( n*( n+1 ) ) / 2, sigma, ap, 1 )
241 CALL chptrd( uplo, n, ap, w, rwork( inde ), work( indtau ),
247 IF( .NOT.wantz )
THEN
248 CALL ssterf( n, w, rwork( inde ), info )
251 CALL cupgtr( uplo, n, ap, work( indtau ), z, ldz,
252 $ work( indwrk ), iinfo )
254 CALL csteqr( jobz, n, w, rwork( inde ), z, ldz,
255 $ rwork( indrwk ), info )
260 IF( iscale.EQ.1 )
THEN
266 CALL sscal( imax, one / sigma, w, 1 )
subroutine chpev(jobz, uplo, n, ap, w, z, ldz, work, rwork, info)
CHPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine chptrd(uplo, n, ap, d, e, tau, info)
CHPTRD
subroutine csteqr(compz, n, d, e, z, ldz, work, info)
CSTEQR
subroutine cupgtr(uplo, n, ap, tau, q, ldq, work, info)
CUPGTR