129 SUBROUTINE dspev( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO )
140 DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( LDZ, * )
146 DOUBLE PRECISION ZERO, ONE
147 parameter( zero = 0.0d0, one = 1.0d0 )
151 INTEGER IINFO, IMAX, INDE, INDTAU, INDWRK, ISCALE
152 DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
157 DOUBLE PRECISION DLAMCH, DLANSP
158 EXTERNAL lsame, dlamch, dlansp
170 wantz = lsame( jobz,
'V' )
173 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
175 ELSE IF( .NOT.( lsame( uplo,
'U' ) .OR. lsame( uplo,
'L' ) ) )
178 ELSE IF( n.LT.0 )
THEN
180 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
185 CALL xerbla(
'DSPEV ', -info )
203 safmin = dlamch(
'Safe minimum' )
204 eps = dlamch(
'Precision' )
205 smlnum = safmin / eps
206 bignum = one / smlnum
207 rmin = sqrt( smlnum )
208 rmax = sqrt( bignum )
212 anrm = dlansp(
'M', uplo, n, ap, work )
214 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
217 ELSE IF( anrm.GT.rmax )
THEN
221 IF( iscale.EQ.1 )
THEN
222 CALL dscal( ( n*( n+1 ) ) / 2, sigma, ap, 1 )
229 CALL dsptrd( uplo, n, ap, w, work( inde ), work( indtau ), iinfo )
234 IF( .NOT.wantz )
THEN
235 CALL dsterf( n, w, work( inde ), info )
238 CALL dopgtr( uplo, n, ap, work( indtau ), z, ldz,
239 $ work( indwrk ), iinfo )
240 CALL dsteqr( jobz, n, w, work( inde ), z, ldz, work( indtau ),
246 IF( iscale.EQ.1 )
THEN
252 CALL dscal( imax, one / sigma, w, 1 )
subroutine xerbla(srname, info)
subroutine dspev(jobz, uplo, n, ap, w, z, ldz, work, info)
DSPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine dsptrd(uplo, n, ap, d, e, tau, info)
DSPTRD
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dsteqr(compz, n, d, e, z, ldz, work, info)
DSTEQR
subroutine dsterf(n, d, e, info)
DSTERF
subroutine dopgtr(uplo, n, ap, tau, q, ldq, work, info)
DOPGTR