116 SUBROUTINE zgesc2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
125 DOUBLE PRECISION SCALE
128 INTEGER IPIV( * ), JPIV( * )
129 COMPLEX*16 A( lda, * ), RHS( * )
135 DOUBLE PRECISION ZERO, ONE, TWO
136 parameter ( zero = 0.0d+0, one = 1.0d+0, two = 2.0d+0 )
140 DOUBLE PRECISION BIGNUM, EPS, SMLNUM
148 DOUBLE PRECISION DLAMCH
149 EXTERNAL izamax, dlamch
152 INTRINSIC abs, dble, dcmplx
159 smlnum = dlamch(
'S' ) / eps
160 bignum = one / smlnum
161 CALL dlabad( smlnum, bignum )
165 CALL zlaswp( 1, rhs, lda, 1, n-1, ipiv, 1 )
171 rhs( j ) = rhs( j ) - a( j, i )*rhs( i )
181 i = izamax( n, rhs, 1 )
182 IF( two*smlnum*abs( rhs( i ) ).GT.abs( a( n, n ) ) )
THEN
183 temp = dcmplx( one / two, zero ) / abs( rhs( i ) )
184 CALL zscal( n, temp, rhs( 1 ), 1 )
185 scale = scale*dble( temp )
188 temp = dcmplx( one, zero ) / a( i, i )
189 rhs( i ) = rhs( i )*temp
191 rhs( i ) = rhs( i ) - rhs( j )*( a( i, j )*temp )
197 CALL zlaswp( 1, rhs, lda, 1, n-1, jpiv, -1 )
subroutine zlaswp(N, A, LDA, K1, K2, IPIV, INCX)
ZLASWP performs a series of row interchanges on a general rectangular matrix.
subroutine dlabad(SMALL, LARGE)
DLABAD
subroutine zgesc2(N, A, LDA, RHS, IPIV, JPIV, SCALE)
ZGESC2 solves a system of linear equations using the LU factorization with complete pivoting computed...
subroutine zscal(N, ZA, ZX, INCX)
ZSCAL