133 SUBROUTINE dsyev( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )
142 INTEGER INFO, LDA, LWORK, N
145 DOUBLE PRECISION A( lda, * ), W( * ), WORK( * )
151 DOUBLE PRECISION ZERO, ONE
152 parameter ( zero = 0.0d0, one = 1.0d0 )
155 LOGICAL LOWER, LQUERY, WANTZ
156 INTEGER IINFO, IMAX, INDE, INDTAU, INDWRK, ISCALE,
158 DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
164 DOUBLE PRECISION DLAMCH, DLANSY
165 EXTERNAL lsame, ilaenv, dlamch, dlansy
178 wantz = lsame( jobz,
'V' )
179 lower = lsame( uplo,
'L' )
180 lquery = ( lwork.EQ.-1 )
183 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
185 ELSE IF( .NOT.( lower .OR. lsame( uplo,
'U' ) ) )
THEN
187 ELSE IF( n.LT.0 )
THEN
189 ELSE IF( lda.LT.max( 1, n ) )
THEN
194 nb = ilaenv( 1,
'DSYTRD', uplo, n, -1, -1, -1 )
195 lwkopt = max( 1, ( nb+2 )*n )
198 IF( lwork.LT.max( 1, 3*n-1 ) .AND. .NOT.lquery )
203 CALL xerbla(
'DSYEV ', -info )
205 ELSE IF( lquery )
THEN
225 safmin = dlamch(
'Safe minimum' )
226 eps = dlamch(
'Precision' )
227 smlnum = safmin / eps
228 bignum = one / smlnum
229 rmin = sqrt( smlnum )
230 rmax = sqrt( bignum )
234 anrm = dlansy(
'M', uplo, n, a, lda, work )
236 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
239 ELSE IF( anrm.GT.rmax )
THEN
244 $
CALL dlascl( uplo, 0, 0, one, sigma, n, n, a, lda, info )
251 llwork = lwork - indwrk + 1
252 CALL dsytrd( uplo, n, a, lda, w, work( inde ), work( indtau ),
253 $ work( indwrk ), llwork, iinfo )
258 IF( .NOT.wantz )
THEN
259 CALL dsterf( n, w, work( inde ), info )
261 CALL dorgtr( uplo, n, a, lda, work( indtau ), work( indwrk ),
263 CALL dsteqr( jobz, n, w, work( inde ), a, lda, work( indtau ),
269 IF( iscale.EQ.1 )
THEN
275 CALL dscal( imax, one / sigma, w, 1 )
subroutine dsterf(N, D, E, INFO)
DSTERF
subroutine dorgtr(UPLO, N, A, LDA, TAU, WORK, LWORK, INFO)
DORGTR
subroutine dsyev(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO)
DSYEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices ...
subroutine dsytrd(UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO)
DSYTRD
subroutine dlascl(TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO)
DLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine dsteqr(COMPZ, N, D, E, Z, LDZ, WORK, INFO)
DSTEQR
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dscal(N, DA, DX, INCX)
DSCAL