141 SUBROUTINE stpt02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
150 CHARACTER DIAG, TRANS, UPLO
151 INTEGER LDB, LDX, N, NRHS
155 REAL AP( * ), B( ldb, * ), WORK( * ), X( ldx, * )
162 parameter ( zero = 0.0e+0, one = 1.0e+0 )
166 REAL ANORM, BNORM, EPS, XNORM
170 REAL SASUM, SLAMCH, SLANTP
171 EXTERNAL lsame, sasum, slamch, slantp
183 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
190 IF( lsame( trans,
'N' ) )
THEN
191 anorm = slantp(
'1', uplo, diag, n, ap, work )
193 anorm = slantp(
'I', uplo, diag, n, ap, work )
198 eps = slamch(
'Epsilon' )
199 IF( anorm.LE.zero )
THEN
209 CALL scopy( n, x( 1, j ), 1, work, 1 )
210 CALL stpmv( uplo, trans, diag, n, ap, work, 1 )
211 CALL saxpy( n, -one, b( 1, j ), 1, work, 1 )
212 bnorm = sasum( n, work, 1 )
213 xnorm = sasum( n, x( 1, j ), 1 )
214 IF( xnorm.LE.zero )
THEN
217 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine stpmv(UPLO, TRANS, DIAG, N, AP, X, INCX)
STPMV
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY
subroutine stpt02(UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB, WORK, RESID)
STPT02
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY