231 SUBROUTINE sspevx( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
232 $ ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL,
240 CHARACTER JOBZ, RANGE, UPLO
241 INTEGER IL, INFO, IU, LDZ, M, N
245 INTEGER IFAIL( * ), IWORK( * )
246 REAL AP( * ), W( * ), WORK( * ), Z( LDZ, * )
253 PARAMETER ( ZERO = 0.0e0, one = 1.0e0 )
256 LOGICAL ALLEIG, INDEIG, TEST, VALEIG, WANTZ
258 INTEGER I, IINFO, IMAX, INDD, INDE, INDEE,
259 $ indisp, indiwo, indtau, indwrk, iscale, itmp1,
261 REAL ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
262 $ SIGMA, SMLNUM, TMP1, VLL, VUU
267 EXTERNAL lsame, slamch, slansp
274 INTRINSIC max, min, sqrt
280 wantz = lsame( jobz,
'V' )
281 alleig = lsame( range,
'A' )
282 valeig = lsame( range,
'V' )
283 indeig = lsame( range,
'I' )
286 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
288 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
290 ELSE IF( .NOT.( lsame( uplo,
'L' ) .OR. lsame( uplo,
'U' ) ) )
293 ELSE IF( n.LT.0 )
THEN
297 IF( n.GT.0 .AND. vu.LE.vl )
299 ELSE IF( indeig )
THEN
300 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
302 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
308 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
313 CALL xerbla(
'SSPEVX', -info )
324 IF( alleig .OR. indeig )
THEN
328 IF( vl.LT.ap( 1 ) .AND. vu.GE.ap( 1 ) )
THEN
340 safmin = slamch(
'Safe minimum' )
341 eps = slamch(
'Precision' )
342 smlnum = safmin / eps
343 bignum = one / smlnum
344 rmin = sqrt( smlnum )
345 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
358 anrm = slansp(
'M', uplo, n, ap, work )
359 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
362 ELSE IF( anrm.GT.rmax )
THEN
366 IF( iscale.EQ.1 )
THEN
367 CALL sscal( ( n*( n+1 ) ) / 2, sigma, ap, 1 )
369 $ abstll = abstol*sigma
382 CALL ssptrd( uplo, n, ap, work( indd ), work( inde ),
383 $ work( indtau ), iinfo )
391 IF (il.EQ.1 .AND. iu.EQ.n)
THEN
395 IF ((alleig .OR. test) .AND. (abstol.LE.zero))
THEN
396 CALL scopy( n, work( indd ), 1, w, 1 )
398 IF( .NOT.wantz )
THEN
399 CALL scopy( n-1, work( inde ), 1, work( indee ), 1 )
400 CALL ssterf( n, w, work( indee ), info )
402 CALL sopgtr( uplo, n, ap, work( indtau ), z, ldz,
403 $ work( indwrk ), iinfo )
404 CALL scopy( n-1, work( inde ), 1, work( indee ), 1 )
405 CALL ssteqr( jobz, n, w, work( indee ), z, ldz,
406 $ work( indwrk ), info )
429 CALL sstebz( range, order, n, vll, vuu, il, iu, abstll,
430 $ work( indd ), work( inde ), m, nsplit, w,
431 $ iwork( 1 ), iwork( indisp ), work( indwrk ),
432 $ iwork( indiwo ), info )
435 CALL sstein( n, work( indd ), work( inde ), m, w,
436 $ iwork( 1 ), iwork( indisp ), z, ldz,
437 $ work( indwrk ), iwork( indiwo ), ifail, info )
442 CALL sopmtr(
'L', uplo,
'N', n, m, ap, work( indtau ), z, ldz,
443 $ work( indwrk ), iinfo )
449 IF( iscale.EQ.1 )
THEN
455 CALL sscal( imax, one / sigma, w, 1 )
466 IF( w( jj ).LT.tmp1 )
THEN
473 itmp1 = iwork( 1 + i-1 )
475 iwork( 1 + i-1 ) = iwork( 1 + j-1 )
477 iwork( 1 + j-1 ) = itmp1
478 CALL sswap( n, z( 1, i ), 1, z( 1, j ), 1 )
481 ifail( i ) = ifail( j )
subroutine xerbla(srname, info)
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine sspevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
SSPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine ssptrd(uplo, n, ap, d, e, tau, info)
SSPTRD
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine sstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
SSTEBZ
subroutine sstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
SSTEIN
subroutine ssteqr(compz, n, d, e, z, ldz, work, info)
SSTEQR
subroutine ssterf(n, d, e, info)
SSTERF
subroutine sswap(n, sx, incx, sy, incy)
SSWAP
subroutine sopgtr(uplo, n, ap, tau, q, ldq, work, info)
SOPGTR
subroutine sopmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
SOPMTR