150 SUBROUTINE strt02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
159 CHARACTER diag, trans, uplo
160 INTEGER lda, ldb, ldx, n, nrhs
164 REAL a( lda, * ),
b( ldb, * ), work( * ),
172 parameter( zero = 0.0e+0, one = 1.0e+0 )
176 REAL anorm, bnorm, eps, xnorm
193 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
200 IF(
lsame( trans,
'N' ) )
THEN
201 anorm =
slantr(
'1', uplo, diag, n, n, a, lda, work )
203 anorm =
slantr(
'I', uplo, diag, n, n, a, lda, work )
209 IF( anorm.LE.zero )
THEN
219 CALL
scopy( n, x( 1,
j ), 1, work, 1 )
220 CALL
strmv( uplo, trans, diag, n, a, lda, work, 1 )
221 CALL
saxpy( n, -one,
b( 1,
j ), 1, work, 1 )
222 bnorm =
sasum( n, work, 1 )
223 xnorm =
sasum( n, x( 1,
j ), 1 )
224 IF( xnorm.LE.zero )
THEN
227 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
real function sasum(N, SX, INCX)
SASUM
subroutine strt02(UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B, LDB, WORK, RESID)
STRT02
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real b(3) integer i
subroutine strmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
STRMV
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY
logical function lsame(CA, CB)
LSAME
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY
real function slamch(CMACH)
SLAMCH
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real j
real function slantr(NORM, UPLO, DIAG, M, N, A, LDA, WORK)
SLANTR returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a trapezoidal or triangular matrix.