144 SUBROUTINE dtrexc( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, WORK,
153 INTEGER IFST, ILST, INFO, LDQ, LDT, N
156 DOUBLE PRECISION Q( LDQ, * ), T( LDT, * ), WORK( * )
162 DOUBLE PRECISION ZERO
163 parameter( zero = 0.0d+0 )
167 INTEGER HERE, NBF, NBL, NBNEXT
184 wantq = lsame( compq,
'V' )
185 IF( .NOT.wantq .AND. .NOT.lsame( compq,
'N' ) )
THEN
187 ELSE IF( n.LT.0 )
THEN
189 ELSE IF( ldt.LT.max( 1, n ) )
THEN
191 ELSE IF( ldq.LT.1 .OR. ( wantq .AND. ldq.LT.max( 1, n ) ) )
THEN
193 ELSE IF(( ifst.LT.1 .OR. ifst.GT.n ).AND.( n.GT.0 ))
THEN
195 ELSE IF(( ilst.LT.1 .OR. ilst.GT.n ).AND.( n.GT.0 ))
THEN
199 CALL xerbla(
'DTREXC', -info )
212 IF( t( ifst, ifst-1 ).NE.zero )
217 IF( t( ifst+1, ifst ).NE.zero )
225 IF( t( ilst, ilst-1 ).NE.zero )
230 IF( t( ilst+1, ilst ).NE.zero )
237 IF( ifst.LT.ilst )
THEN
241 IF( nbf.EQ.2 .AND. nbl.EQ.1 )
243 IF( nbf.EQ.1 .AND. nbl.EQ.2 )
252 IF( nbf.EQ.1 .OR. nbf.EQ.2 )
THEN
257 IF( here+nbf+1.LE.n )
THEN
258 IF( t( here+nbf+1, here+nbf ).NE.zero )
261 CALL dlaexc( wantq, n, t, ldt, q, ldq, here, nbf, nbnext,
272 IF( t( here+1, here ).EQ.zero )
282 IF( here+3.LE.n )
THEN
283 IF( t( here+3, here+2 ).NE.zero )
286 CALL dlaexc( wantq, n, t, ldt, q, ldq, here+1, 1, nbnext,
292 IF( nbnext.EQ.1 )
THEN
296 CALL dlaexc( wantq, n, t, ldt, q, ldq, here, 1,
304 IF( t( here+2, here+1 ).EQ.zero )
306 IF( nbnext.EQ.2 )
THEN
310 CALL dlaexc( wantq, n, t, ldt, q, ldq, here, 1,
311 $ nbnext, work, info )
321 CALL dlaexc( wantq, n, t, ldt, q, ldq, here, 1, 1,
323 CALL dlaexc( wantq, n, t, ldt, q, ldq, here+1, 1,
340 IF( nbf.EQ.1 .OR. nbf.EQ.2 )
THEN
346 IF( t( here-1, here-2 ).NE.zero )
349 CALL dlaexc( wantq, n, t, ldt, q, ldq, here-nbnext,
361 IF( t( here+1, here ).EQ.zero )
372 IF( t( here-1, here-2 ).NE.zero )
375 CALL dlaexc( wantq, n, t, ldt, q, ldq, here-nbnext,
382 IF( nbnext.EQ.1 )
THEN
386 CALL dlaexc( wantq, n, t, ldt, q, ldq, here, nbnext,
394 IF( t( here, here-1 ).EQ.zero )
396 IF( nbnext.EQ.2 )
THEN
400 CALL dlaexc( wantq, n, t, ldt, q, ldq, here-1, 2,
412 CALL dlaexc( wantq, n, t, ldt, q, ldq, here, 1, 1,
414 CALL dlaexc( wantq, n, t, ldt, q, ldq, here-1, 1,