113 SUBROUTINE dgesc2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
121 DOUBLE PRECISION SCALE
124 INTEGER IPIV( * ), JPIV( * )
125 DOUBLE PRECISION A( LDA, * ), RHS( * )
131 DOUBLE PRECISION ONE, TWO
132 parameter( one = 1.0d+0, two = 2.0d+0 )
136 DOUBLE PRECISION BIGNUM, EPS, SMLNUM, TEMP
143 DOUBLE PRECISION DLAMCH
144 EXTERNAL idamax, dlamch
154 smlnum = dlamch(
'S' ) / eps
155 bignum = one / smlnum
159 CALL dlaswp( 1, rhs, lda, 1, n-1, ipiv, 1 )
165 rhs( j ) = rhs( j ) - a( j, i )*rhs( i )
175 i = idamax( n, rhs, 1 )
176 IF( two*smlnum*abs( rhs( i ) ).GT.abs( a( n, n ) ) )
THEN
177 temp = ( one / two ) / abs( rhs( i ) )
178 CALL dscal( n, temp, rhs( 1 ), 1 )
183 temp = one / a( i, i )
184 rhs( i ) = rhs( i )*temp
186 rhs( i ) = rhs( i ) - rhs( j )*( a( i, j )*temp )
192 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.
subroutine dscal(n, da, dx, incx)
DSCAL