121 SUBROUTINE zgtsv( N, NRHS, DL, D, DU, B, LDB, INFO )
128 INTEGER INFO, LDB, N, NRHS
131 COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * )
138 parameter( zero = ( 0.0d+0, 0.0d+0 ) )
142 COMPLEX*16 MULT, TEMP, ZDUM
145 INTRINSIC abs, dble, dimag, max
151 DOUBLE PRECISION CABS1
154 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
161 ELSE IF( nrhs.LT.0 )
THEN
163 ELSE IF( ldb.LT.max( 1, n ) )
THEN
167 CALL xerbla(
'ZGTSV ', -info )
175 IF( dl( k ).EQ.zero )
THEN
179 IF( d( k ).EQ.zero )
THEN
187 ELSE IF( cabs1( d( k ) ).GE.cabs1( dl( k ) ) )
THEN
191 mult = dl( k ) / d( k )
192 d( k+1 ) = d( k+1 ) - mult*du( k )
194 b( k+1, j ) = b( k+1, j ) - mult*b( k, j )
202 mult = d( k ) / dl( k )
205 d( k+1 ) = du( k ) - mult*temp
206 IF( k.LT.( n-1 ) )
THEN
208 du( k+1 ) = -mult*dl( k )
213 b( k, j ) = b( k+1, j )
214 b( k+1, j ) = temp - mult*b( k+1, j )
218 IF( d( n ).EQ.zero )
THEN
226 b( n, j ) = b( n, j ) / d( n )
228 $ b( n-1, j ) = ( b( n-1, j )-du( n-1 )*b( n, j ) ) / d( n-1 )
229 DO 40 k = n - 2, 1, -1
230 b( k, j ) = ( b( k, j )-du( k )*b( k+1, j )-dl( k )*
231 $ b( k+2, j ) ) / d( k )
subroutine zgtsv(n, nrhs, dl, d, du, b, ldb, info)
ZGTSV computes the solution to system of linear equations A * X = B for GT matrices