133 SUBROUTINE ssyev( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )
142 INTEGER INFO, LDA, LWORK, N
145 REAL A( lda, * ), W( * ), WORK( * )
152 parameter ( zero = 0.0e0, one = 1.0e0 )
155 LOGICAL LOWER, LQUERY, WANTZ
156 INTEGER IINFO, IMAX, INDE, INDTAU, INDWRK, ISCALE,
158 REAL ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
165 EXTERNAL ilaenv, lsame, slamch, slansy
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,
'SSYTRD', 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(
'SSYEV ', -info )
205 ELSE IF( lquery )
THEN
225 safmin = slamch(
'Safe minimum' )
226 eps = slamch(
'Precision' )
227 smlnum = safmin / eps
228 bignum = one / smlnum
229 rmin = sqrt( smlnum )
230 rmax = sqrt( bignum )
234 anrm = slansy(
'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 slascl( uplo, 0, 0, one, sigma, n, n, a, lda, info )
251 llwork = lwork - indwrk + 1
252 CALL ssytrd( uplo, n, a, lda, w, work( inde ), work( indtau ),
253 $ work( indwrk ), llwork, iinfo )
258 IF( .NOT.wantz )
THEN
259 CALL ssterf( n, w, work( inde ), info )
261 CALL sorgtr( uplo, n, a, lda, work( indtau ), work( indwrk ),
263 CALL ssteqr( jobz, n, w, work( inde ), a, lda, work( indtau ),
269 IF( iscale.EQ.1 )
THEN
275 CALL sscal( imax, one / sigma, w, 1 )
subroutine ssteqr(COMPZ, N, D, E, Z, LDZ, WORK, INFO)
SSTEQR
subroutine ssytrd(UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO)
SSYTRD
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine slascl(TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO)
SLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine sscal(N, SA, SX, INCX)
SSCAL
subroutine ssterf(N, D, E, INFO)
SSTERF
subroutine ssyev(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO)
SSYEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices ...
subroutine sorgtr(UPLO, N, A, LDA, TAU, WORK, LWORK, INFO)
SORGTR