123 SUBROUTINE zgtsv( N, NRHS, DL, D, DU, B, LDB, INFO )
130 INTEGER INFO, LDB, N, NRHS
133 COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * )
140 parameter( zero = ( 0.0d+0, 0.0d+0 ) )
144 COMPLEX*16 MULT, TEMP, ZDUM
147 INTRINSIC abs, dble, dimag, max
153 DOUBLE PRECISION CABS1
156 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
163 ELSE IF( nrhs.LT.0 )
THEN
165 ELSE IF( ldb.LT.max( 1, n ) )
THEN
169 CALL xerbla(
'ZGTSV ', -info )
177 IF( dl( k ).EQ.zero )
THEN
181 IF( d( k ).EQ.zero )
THEN
189 ELSE IF( cabs1( d( k ) ).GE.cabs1( dl( k ) ) )
THEN
193 mult = dl( k ) / d( k )
194 d( k+1 ) = d( k+1 ) - mult*du( k )
196 b( k+1, j ) = b( k+1, j ) - mult*b( k, j )
204 mult = d( k ) / dl( k )
207 d( k+1 ) = du( k ) - mult*temp
208 IF( k.LT.( n-1 ) )
THEN
210 du( k+1 ) = -mult*dl( k )
215 b( k, j ) = b( k+1, j )
216 b( k+1, j ) = temp - mult*b( k+1, j )
220 IF( d( n ).EQ.zero )
THEN
228 b( n, j ) = b( n, j ) / d( n )
230 $ b( n-1, j ) = ( b( n-1, j )-du( n-1 )*b( n, j ) ) / d( n-1 )
231 DO 40 k = n - 2, 1, -1
232 b( k, j ) = ( b( k, j )-du( k )*b( k+1, j )-dl( k )*
233 $ b( k+2, j ) ) / d( k )
subroutine xerbla(srname, info)
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