170 SUBROUTINE dspevd( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
171 $ IWORK, LIWORK, INFO )
179 INTEGER INFO, LDZ, LIWORK, LWORK, N
183 DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( LDZ, * )
189 DOUBLE PRECISION ZERO, ONE
190 parameter( zero = 0.0d+0, one = 1.0d+0 )
193 LOGICAL LQUERY, WANTZ
194 INTEGER IINFO, INDE, INDTAU, INDWRK, ISCALE, LIWMIN,
196 DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
201 DOUBLE PRECISION DLAMCH, DLANSP
202 EXTERNAL lsame, dlamch, dlansp
214 wantz = lsame( jobz,
'V' )
215 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
218 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
220 ELSE IF( .NOT.( lsame( uplo,
'U' ) .OR. lsame( uplo,
'L' ) ) )
223 ELSE IF( n.LT.0 )
THEN
225 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
236 lwmin = 1 + 6*n + n**2
245 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
247 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
253 CALL xerbla(
'DSPEVD', -info )
255 ELSE IF( lquery )
THEN
273 safmin = dlamch(
'Safe minimum' )
274 eps = dlamch(
'Precision' )
275 smlnum = safmin / eps
276 bignum = one / smlnum
277 rmin = sqrt( smlnum )
278 rmax = sqrt( bignum )
282 anrm = dlansp(
'M', uplo, n, ap, work )
284 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
287 ELSE IF( anrm.GT.rmax )
THEN
291 IF( iscale.EQ.1 )
THEN
292 CALL dscal( ( n*( n+1 ) ) / 2, sigma, ap, 1 )
299 CALL dsptrd( uplo, n, ap, w, work( inde ), work( indtau ), iinfo )
306 IF( .NOT.wantz )
THEN
307 CALL dsterf( n, w, work( inde ), info )
310 llwork = lwork - indwrk + 1
311 CALL dstedc(
'I', n, w, work( inde ), z, ldz, work( indwrk ),
312 $ llwork, iwork, liwork, info )
313 CALL dopmtr(
'L', uplo,
'N', n, n, ap, work( indtau ), z, ldz,
314 $ work( indwrk ), iinfo )
320 $
CALL dscal( n, one / sigma, w, 1 )
subroutine xerbla(srname, info)
subroutine dspevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, iwork, liwork, info)
DSPEVD 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 dstedc(compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info)
DSTEDC
subroutine dsterf(n, d, e, info)
DSTERF
subroutine dopmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
DOPMTR