185 SUBROUTINE dsbevd( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
186 $ LWORK, IWORK, LIWORK, INFO )
194 INTEGER INFO, KD, LDAB, LDZ, LIWORK, LWORK, N
198 DOUBLE PRECISION AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
204 DOUBLE PRECISION ZERO, ONE
205 parameter( zero = 0.0d+0, one = 1.0d+0 )
208 LOGICAL LOWER, LQUERY, WANTZ
209 INTEGER IINFO, INDE, INDWK2, INDWRK, ISCALE, LIWMIN,
211 DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
216 DOUBLE PRECISION DLAMCH, DLANSB
217 EXTERNAL lsame, dlamch, dlansb
230 wantz = lsame( jobz,
'V' )
231 lower = lsame( uplo,
'L' )
232 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
241 lwmin = 1 + 5*n + 2*n**2
247 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
249 ELSE IF( .NOT.( lower .OR. lsame( uplo,
'U' ) ) )
THEN
251 ELSE IF( n.LT.0 )
THEN
253 ELSE IF( kd.LT.0 )
THEN
255 ELSE IF( ldab.LT.kd+1 )
THEN
257 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
265 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
267 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
273 CALL xerbla(
'DSBEVD', -info )
275 ELSE IF( lquery )
THEN
293 safmin = dlamch(
'Safe minimum' )
294 eps = dlamch(
'Precision' )
295 smlnum = safmin / eps
296 bignum = one / smlnum
297 rmin = sqrt( smlnum )
298 rmax = sqrt( bignum )
302 anrm = dlansb(
'M', uplo, n, kd, ab, ldab, work )
304 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
307 ELSE IF( anrm.GT.rmax )
THEN
311 IF( iscale.EQ.1 )
THEN
313 CALL dlascl(
'B', kd, kd, one, sigma, n, n, ab, ldab, info )
315 CALL dlascl(
'Q', kd, kd, one, sigma, n, n, ab, ldab, info )
323 indwk2 = indwrk + n*n
324 llwrk2 = lwork - indwk2 + 1
325 CALL dsbtrd( jobz, uplo, n, kd, ab, ldab, w, work( inde ), z, ldz,
326 $ work( indwrk ), iinfo )
330 IF( .NOT.wantz )
THEN
331 CALL dsterf( n, w, work( inde ), info )
333 CALL dstedc(
'I', n, w, work( inde ), work( indwrk ), n,
334 $ work( indwk2 ), llwrk2, iwork, liwork, info )
335 CALL dgemm(
'N',
'N', n, n, n, one, z, ldz, work( indwrk ), n,
336 $ zero, work( indwk2 ), n )
337 CALL dlacpy(
'A', n, n, work( indwk2 ), n, z, ldz )
343 $
CALL dscal( n, one / sigma, w, 1 )
subroutine xerbla(srname, info)
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dsbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, iwork, liwork, info)
DSBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dsbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
DSBTRD
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
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 dstedc(compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info)
DSTEDC
subroutine dsterf(n, d, e, info)
DSTERF