111 SUBROUTINE sgesc2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
122 INTEGER IPIV( * ), JPIV( * )
123 REAL A( LDA, * ), RHS( * )
130 parameter( one = 1.0e+0, two = 2.0e+0 )
134 REAL BIGNUM, EPS, SMLNUM, TEMP
142 EXTERNAL isamax, slamch
152 smlnum = slamch(
'S' ) / eps
153 bignum = one / smlnum
157 CALL slaswp( 1, rhs, lda, 1, n-1, ipiv, 1 )
163 rhs( j ) = rhs( j ) - a( j, i )*rhs( i )
173 i = isamax( 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 sscal( 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 slaswp( 1, rhs, lda, 1, n-1, jpiv, -1 )
subroutine sgesc2(n, a, lda, rhs, ipiv, jpiv, scale)
SGESC2 solves a system of linear equations using the LU factorization with complete pivoting computed...
subroutine slaswp(n, a, lda, k1, k2, ipiv, incx)
SLASWP performs a series of row interchanges on a general rectangular matrix.