144 SUBROUTINE dsbev( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
153 INTEGER INFO, KD, LDAB, LDZ, N
156 DOUBLE PRECISION AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
162 DOUBLE PRECISION ZERO, ONE
163 parameter( zero = 0.0d0, one = 1.0d0 )
167 INTEGER IINFO, IMAX, INDE, INDWRK, ISCALE
168 DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
173 DOUBLE PRECISION DLAMCH, DLANSB
174 EXTERNAL lsame, dlamch, dlansb
186 wantz = lsame( jobz,
'V' )
187 lower = lsame( uplo,
'L' )
190 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
192 ELSE IF( .NOT.( lower .OR. lsame( uplo,
'U' ) ) )
THEN
194 ELSE IF( n.LT.0 )
THEN
196 ELSE IF( kd.LT.0 )
THEN
198 ELSE IF( ldab.LT.kd+1 )
THEN
200 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
205 CALL xerbla(
'DSBEV ', -info )
218 w( 1 ) = ab( kd+1, 1 )
227 safmin = dlamch(
'Safe minimum' )
228 eps = dlamch(
'Precision' )
229 smlnum = safmin / eps
230 bignum = one / smlnum
231 rmin = sqrt( smlnum )
232 rmax = sqrt( bignum )
236 anrm = dlansb(
'M', uplo, n, kd, ab, ldab, work )
238 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
241 ELSE IF( anrm.GT.rmax )
THEN
245 IF( iscale.EQ.1 )
THEN
247 CALL dlascl(
'B', kd, kd, one, sigma, n, n, ab, ldab, info )
249 CALL dlascl(
'Q', kd, kd, one, sigma, n, n, ab, ldab, info )
257 CALL dsbtrd( jobz, uplo, n, kd, ab, ldab, w, work( inde ), z, ldz,
258 $ work( indwrk ), iinfo )
262 IF( .NOT.wantz )
THEN
263 CALL dsterf( n, w, work( inde ), info )
265 CALL dsteqr( jobz, n, w, work( inde ), z, ldz, work( indwrk ),
271 IF( iscale.EQ.1 )
THEN
277 CALL dscal( imax, one / sigma, w, 1 )
subroutine xerbla(srname, info)
subroutine dsbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, info)
DSBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine dsbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
DSBTRD
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 dscal(n, da, dx, incx)
DSCAL
subroutine dsteqr(compz, n, d, e, z, ldz, work, info)
DSTEQR
subroutine dsterf(n, d, e, info)
DSTERF