111 SUBROUTINE dgesc2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
119 DOUBLE PRECISION SCALE
122 INTEGER IPIV( * ), JPIV( * )
123 DOUBLE PRECISION A( LDA, * ), RHS( * )
129 DOUBLE PRECISION ONE, TWO
130 parameter( one = 1.0d+0, two = 2.0d+0 )
134 DOUBLE PRECISION BIGNUM, EPS, SMLNUM, TEMP
141 DOUBLE PRECISION DLAMCH
142 EXTERNAL idamax, dlamch
152 smlnum = dlamch(
'S' ) / eps
153 bignum = one / smlnum
157 CALL dlaswp( 1, rhs, lda, 1, n-1, ipiv, 1 )
163 rhs( j ) = rhs( j ) - a( j, i )*rhs( i )
173 i = idamax( n, rhs, 1 )
174 IF( two*smlnum*abs( rhs( i ) ).GT.abs( a( n, n ) ) )
THEN
175 temp = ( one / two ) / abs( rhs( i ) )
176 CALL dscal( n, temp, rhs( 1 ), 1 )
181 temp = one / a( i, i )
182 rhs( i ) = rhs( i )*temp
184 rhs( i ) = rhs( i ) - rhs( j )*( a( i, j )*temp )
190 CALL dlaswp( 1, rhs, lda, 1, n-1, jpiv, -1 )
subroutine dgesc2(n, a, lda, rhs, ipiv, jpiv, scale)
DGESC2 solves a system of linear equations using the LU factorization with complete pivoting computed...
subroutine dlaswp(n, a, lda, k1, k2, ipiv, incx)
DLASWP performs a series of row interchanges on a general rectangular matrix.