140 SUBROUTINE dtpt02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
148 CHARACTER DIAG, TRANS, UPLO
149 INTEGER LDB, LDX, N, NRHS
150 DOUBLE PRECISION RESID
153 DOUBLE PRECISION AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
159 DOUBLE PRECISION ZERO, ONE
160 parameter( zero = 0.0d+0, one = 1.0d+0 )
164 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
168 DOUBLE PRECISION DASUM, DLAMCH, DLANTP
169 EXTERNAL lsame, dasum, dlamch, dlantp
181 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
188 IF( lsame( trans,
'N' ) )
THEN
189 anorm = dlantp(
'1', uplo, diag, n, ap, work )
191 anorm = dlantp(
'I', uplo, diag, n, ap, work )
196 eps = dlamch(
'Epsilon' )
197 IF( anorm.LE.zero )
THEN
207 CALL dcopy( n, x( 1, j ), 1, work, 1 )
208 CALL dtpmv( uplo, trans, diag, n, ap, work, 1 )
209 CALL daxpy( n, -one, b( 1, j ), 1, work, 1 )
210 bnorm = dasum( n, work, 1 )
211 xnorm = dasum( n, x( 1, j ), 1 )
212 IF( xnorm.LE.zero )
THEN
215 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine dtpt02(uplo, trans, diag, n, nrhs, ap, x, ldx, b, ldb, work, resid)
DTPT02
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dtpmv(uplo, trans, diag, n, ap, x, incx)
DTPMV