125 SUBROUTINE zgtsv( N, NRHS, DL, D, DU, B, LDB, INFO )
133 INTEGER info, ldb, n, nrhs
136 COMPLEX*16 b( ldb, * ), d( * ), dl( * ), du( * )
143 parameter( zero = ( 0.0d+0, 0.0d+0 ) )
147 COMPLEX*16 mult, temp, zdum
150 INTRINSIC abs, dble, dimag, max
156 DOUBLE PRECISION cabs1
159 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
166 ELSE IF( nrhs.LT.0 )
THEN
168 ELSE IF( ldb.LT.max( 1, n ) )
THEN
172 CALL
xerbla(
'ZGTSV ', -info )
180 IF( dl( k ).EQ.zero )
THEN
184 IF( d( k ).EQ.zero )
THEN
192 ELSE IF( cabs1( d( k ) ).GE.cabs1( dl( k ) ) )
THEN
196 mult = dl( k ) / d( k )
197 d( k+1 ) = d( k+1 ) - mult*du( k )
199 b( k+1, j ) = b( k+1, j ) - mult*b( k, j )
207 mult = d( k ) / dl( k )
210 d( k+1 ) = du( k ) - mult*temp
211 IF( k.LT.( n-1 ) )
THEN
213 du( k+1 ) = -mult*dl( k )
218 b( k, j ) = b( k+1, j )
219 b( k+1, j ) = temp - mult*b( k+1, j )
223 IF( d( n ).EQ.zero )
THEN
231 b( n, j ) = b( n, j ) / d( n )
233 $ b( n-1, j ) = ( b( n-1, j )-du( n-1 )*b( n, j ) ) / d( n-1 )
234 DO 40 k = n - 2, 1, -1
235 b( k, j ) = ( b( k, j )-du( k )*b( k+1, j )-dl( k )*
236 $ b( k+2, j ) ) / d( k )