113 SUBROUTINE sgesc2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
124 INTEGER IPIV( * ), JPIV( * )
125 REAL A( LDA, * ), RHS( * )
132 parameter( one = 1.0e+0, two = 2.0e+0 )
136 REAL BIGNUM, EPS, SMLNUM, TEMP
144 EXTERNAL isamax, slamch
154 smlnum = slamch(
'S' ) / eps
155 bignum = one / smlnum
159 CALL slaswp( 1, rhs, lda, 1, n-1, ipiv, 1 )
165 rhs( j ) = rhs( j ) - a( j, i )*rhs( i )
175 i = isamax( 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 sscal( 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 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.
subroutine sscal(n, sa, sx, incx)
SSCAL