260 SUBROUTINE dhsein( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, WR, WI,
261 $ VL, LDVL, VR, LDVR, MM, M, WORK, IFAILL,
269 CHARACTER EIGSRC, INITV, SIDE
270 INTEGER INFO, LDH, LDVL, LDVR, M, MM, N
274 INTEGER IFAILL( * ), IFAILR( * )
275 DOUBLE PRECISION H( LDH, * ), VL( LDVL, * ), VR( LDVR, * ),
276 $ wi( * ), work( * ), wr( * )
282 DOUBLE PRECISION ZERO, ONE
283 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
286 LOGICAL BOTHV, FROMQR, LEFTV, NOINIT, PAIR, RIGHTV
287 INTEGER I, IINFO, K, KL, KLN, KR, KSI, KSR, LDWORK
288 DOUBLE PRECISION BIGNUM, EPS3, HNORM, SMLNUM, ULP, UNFL, WKI,
292 LOGICAL LSAME, DISNAN
293 DOUBLE PRECISION DLAMCH, DLANHS
294 EXTERNAL lsame, dlamch, dlanhs, disnan
306 bothv = lsame( side,
'B' )
307 rightv = lsame( side,
'R' ) .OR. bothv
308 leftv = lsame( side,
'L' ) .OR. bothv
310 fromqr = lsame( eigsrc,
'Q' )
312 noinit = lsame( initv,
'N' )
322 SELECT( k ) = .false.
324 IF( wi( k ).EQ.zero )
THEN
329 IF(
SELECT( k ) .OR.
SELECT( k+1 ) )
THEN
338 IF( .NOT.rightv .AND. .NOT.leftv )
THEN
340 ELSE IF( .NOT.fromqr .AND. .NOT.lsame( eigsrc,
'N' ) )
THEN
342 ELSE IF( .NOT.noinit .AND. .NOT.lsame( initv,
'U' ) )
THEN
344 ELSE IF( n.LT.0 )
THEN
346 ELSE IF( ldh.LT.max( 1, n ) )
THEN
348 ELSE IF( ldvl.LT.1 .OR. ( leftv .AND. ldvl.LT.n ) )
THEN
350 ELSE IF( ldvr.LT.1 .OR. ( rightv .AND. ldvr.LT.n ) )
THEN
352 ELSE IF( mm.LT.m )
THEN
356 CALL xerbla(
'DHSEIN', -info )
367 unfl = dlamch(
'Safe minimum' )
368 ulp = dlamch(
'Precision' )
369 smlnum = unfl*( n / ulp )
370 bignum = ( one-ulp ) / smlnum
384 IF(
SELECT( k ) )
THEN
401 DO 20 i = k, kl + 1, -1
402 IF( h( i, i-1 ).EQ.zero )
409 IF( h( i+1, i ).EQ.zero )
423 hnorm = dlanhs(
'I', kr-kl+1, h( kl, kl ), ldh, work )
424 IF( disnan( hnorm ) )
THEN
427 ELSE IF( hnorm.GT.zero )
THEN
441 DO 70 i = k - 1, kl, -1
442 IF(
SELECT( i ) .AND. abs( wr( i )-wkr )+
443 $ abs( wi( i )-wki ).LT.eps3 )
THEN
460 CALL dlaein( .false., noinit, n-kl+1, h( kl, kl ), ldh,
461 $ wkr, wki, vl( kl, ksr ), vl( kl, ksi ),
462 $ work, ldwork, work( n*n+n+1 ), eps3, smlnum,
464 IF( iinfo.GT.0 )
THEN
489 CALL dlaein( .true., noinit, kr, h, ldh, wkr, wki,
490 $ vr( 1, ksr ), vr( 1, ksi ), work, ldwork,
491 $ work( n*n+n+1 ), eps3, smlnum, bignum,
493 IF( iinfo.GT.0 )
THEN
subroutine xerbla(srname, info)
subroutine dhsein(side, eigsrc, initv, select, n, h, ldh, wr, wi, vl, ldvl, vr, ldvr, mm, m, work, ifaill, ifailr, info)
DHSEIN
subroutine dlaein(rightv, noinit, n, h, ldh, wr, wi, vr, vi, b, ldb, work, eps3, smlnum, bignum, info)
DLAEIN computes a specified right or left eigenvector of an upper Hessenberg matrix by inverse iterat...