227 SUBROUTINE sstevx( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
228 $ m, w, z, ldz, work, iwork, ifail, info )
236 CHARACTER JOBZ, RANGE
237 INTEGER IL, INFO, IU, LDZ, M, N
241 INTEGER IFAIL( * ), IWORK( * )
242 REAL D( * ), E( * ), W( * ), WORK( * ), Z( ldz, * )
249 parameter ( zero = 0.0e0, one = 1.0e0 )
252 LOGICAL ALLEIG, INDEIG, TEST, VALEIG, WANTZ
254 INTEGER I, IMAX, INDIBL, INDISP, INDIWO, INDWRK,
255 $ iscale, itmp1, j, jj, nsplit
256 REAL BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA, SMLNUM,
257 $ tmp1, tnrm, vll, vuu
262 EXTERNAL lsame, slamch, slanst
269 INTRINSIC max, min, sqrt
275 wantz = lsame( jobz,
'V' )
276 alleig = lsame( range,
'A' )
277 valeig = lsame( range,
'V' )
278 indeig = lsame( range,
'I' )
281 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
283 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
285 ELSE IF( n.LT.0 )
THEN
289 IF( n.GT.0 .AND. vu.LE.vl )
291 ELSE IF( indeig )
THEN
292 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
294 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
300 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
305 CALL xerbla(
'SSTEVX', -info )
316 IF( alleig .OR. indeig )
THEN
320 IF( vl.LT.d( 1 ) .AND. vu.GE.d( 1 ) )
THEN
332 safmin = slamch(
'Safe minimum' )
333 eps = slamch(
'Precision' )
334 smlnum = safmin / eps
335 bignum = one / smlnum
336 rmin = sqrt( smlnum )
337 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
349 tnrm = slanst(
'M', n, d, e )
350 IF( tnrm.GT.zero .AND. tnrm.LT.rmin )
THEN
353 ELSE IF( tnrm.GT.rmax )
THEN
357 IF( iscale.EQ.1 )
THEN
358 CALL sscal( n, sigma, d, 1 )
359 CALL sscal( n-1, sigma, e( 1 ), 1 )
372 IF( il.EQ.1 .AND. iu.EQ.n )
THEN
376 IF( ( alleig .OR. test ) .AND. ( abstol.LE.zero ) )
THEN
377 CALL scopy( n, d, 1, w, 1 )
378 CALL scopy( n-1, e( 1 ), 1, work( 1 ), 1 )
380 IF( .NOT.wantz )
THEN
381 CALL ssterf( n, w, work, info )
383 CALL ssteqr(
'I', n, w, work, z, ldz, work( indwrk ), info )
408 CALL sstebz( range, order, n, vll, vuu, il, iu, abstol, d, e, m,
409 $ nsplit, w, iwork( indibl ), iwork( indisp ),
410 $ work( indwrk ), iwork( indiwo ), info )
413 CALL sstein( n, d, e, m, w, iwork( indibl ), iwork( indisp ),
414 $ z, ldz, work( indwrk ), iwork( indiwo ), ifail,
421 IF( iscale.EQ.1 )
THEN
427 CALL sscal( imax, one / sigma, w, 1 )
438 IF( w( jj ).LT.tmp1 )
THEN
445 itmp1 = iwork( indibl+i-1 )
447 iwork( indibl+i-1 ) = iwork( indibl+j-1 )
449 iwork( indibl+j-1 ) = itmp1
450 CALL sswap( n, z( 1, i ), 1, z( 1, j ), 1 )
453 ifail( i ) = ifail( j )
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 xerbla(SRNAME, INFO)
XERBLA
subroutine ssteqr(COMPZ, N, D, E, Z, LDZ, WORK, INFO)
SSTEQR
subroutine sstevx(JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)
SSTEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matric...
subroutine sscal(N, SA, SX, INCX)
SSCAL
subroutine sswap(N, SX, INCX, SY, INCY)
SSWAP
subroutine ssterf(N, D, E, INFO)
SSTERF
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY