131 SUBROUTINE dspev( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO )
143 DOUBLE PRECISION ap( * ), w( * ), work( * ), z( ldz, * )
149 DOUBLE PRECISION zero, one
150 parameter( zero = 0.0d0, one = 1.0d0 )
154 INTEGER iinfo, imax, inde, indtau, indwrk, iscale
155 DOUBLE PRECISION anrm, bignum, eps, rmax, rmin, safmin, sigma,
173 wantz =
lsame( jobz,
'V' )
176 IF( .NOT.( wantz .OR.
lsame( jobz,
'N' ) ) )
THEN
178 ELSE IF( .NOT.(
lsame( uplo,
'U' ) .OR.
lsame( uplo,
'L' ) ) )
181 ELSE IF( n.LT.0 )
THEN
183 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
188 CALL
xerbla(
'DSPEV ', -info )
206 safmin =
dlamch(
'Safe minimum' )
207 eps =
dlamch(
'Precision' )
208 smlnum = safmin / eps
209 bignum = one / smlnum
210 rmin = sqrt( smlnum )
211 rmax = sqrt( bignum )
215 anrm =
dlansp(
'M', uplo, n, ap, work )
217 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
220 ELSE IF( anrm.GT.rmax )
THEN
224 IF( iscale.EQ.1 )
THEN
225 CALL
dscal( ( n*( n+1 ) ) / 2, sigma, ap, 1 )
232 CALL
dsptrd( uplo, n, ap, w, work( inde ), work( indtau ), iinfo )
237 IF( .NOT.wantz )
THEN
238 CALL
dsterf( n, w, work( inde ), info )
241 CALL
dopgtr( uplo, n, ap, work( indtau ), z, ldz,
242 $ work( indwrk ), iinfo )
243 CALL
dsteqr( jobz, n, w, work( inde ), z, ldz, work( indtau ),
249 IF( iscale.EQ.1 )
THEN
255 CALL
dscal( imax, one / sigma, w, 1 )