147 SUBROUTINE zlaein( RIGHTV, NOINIT, N, H, LDH, W, V, B, LDB, RWORK,
148 $ EPS3, SMLNUM, INFO )
155 LOGICAL NOINIT, RIGHTV
156 INTEGER INFO, LDB, LDH, N
157 DOUBLE PRECISION EPS3, SMLNUM
161 DOUBLE PRECISION RWORK( * )
162 COMPLEX*16 B( LDB, * ), H( LDH, * ), V( * )
168 DOUBLE PRECISION ONE, TENTH
169 parameter( one = 1.0d+0, tenth = 1.0d-1 )
171 parameter( zero = ( 0.0d+0, 0.0d+0 ) )
174 CHARACTER NORMIN, TRANS
175 INTEGER I, IERR, ITS, J
176 DOUBLE PRECISION GROWTO, NRMSML, ROOTN, RTEMP, SCALE, VNORM
177 COMPLEX*16 CDUM, EI, EJ, TEMP, X
181 DOUBLE PRECISION DZASUM, DZNRM2
183 EXTERNAL izamax, dzasum, dznrm2, zladiv
189 INTRINSIC abs, dble, dimag, max, sqrt
192 DOUBLE PRECISION CABS1
195 cabs1( cdum ) = abs( dble( cdum ) ) + abs( dimag( cdum ) )
204 rootn = sqrt( dble( n ) )
205 growto = tenth / rootn
206 nrmsml = max( one, eps3*rootn )*smlnum
213 b( i, j ) = h( i, j )
215 b( j, j ) = h( j, j ) - w
229 vnorm = dznrm2( n, v, 1 )
230 CALL zdscal( n, ( eps3*rootn ) / max( vnorm, nrmsml ), v, 1 )
240 IF( cabs1( b( i, i ) ).LT.cabs1( ei ) )
THEN
244 x = zladiv( b( i, i ), ei )
248 b( i+1, j ) = b( i, j ) - x*temp
255 IF( b( i, i ).EQ.zero )
257 x = zladiv( ei, b( i, i ) )
260 b( i+1, j ) = b( i+1, j ) - x*b( i, j )
265 IF( b( n, n ).EQ.zero )
277 IF( cabs1( b( j, j ) ).LT.cabs1( ej ) )
THEN
281 x = zladiv( b( j, j ), ej )
285 b( i, j-1 ) = b( i, j ) - x*temp
292 IF( b( j, j ).EQ.zero )
294 x = zladiv( ej, b( j, j ) )
297 b( i, j-1 ) = b( i, j-1 ) - x*b( i, j )
302 IF( b( 1, 1 ).EQ.zero )
316 CALL zlatrs(
'Upper', trans,
'Nonunit', normin, n, b, ldb, v,
317 $ scale, rwork, ierr )
322 vnorm = dzasum( n, v, 1 )
323 IF( vnorm.GE.growto*scale )
328 rtemp = eps3 / ( rootn+one )
333 v( n-its+1 ) = v( n-its+1 ) - eps3*rootn
344 i = izamax( n, v, 1 )
345 CALL zdscal( n, one / cabs1( v( i ) ), v, 1 )
subroutine zlaein(rightv, noinit, n, h, ldh, w, v, b, ldb, rwork, eps3, smlnum, info)
ZLAEIN computes a specified right or left eigenvector of an upper Hessenberg matrix by inverse iterat...
subroutine zlatrs(uplo, trans, diag, normin, n, a, lda, x, scale, cnorm, info)
ZLATRS solves a triangular system of equations with the scale factor set to prevent overflow.
subroutine zdscal(n, da, zx, incx)
ZDSCAL