141 SUBROUTINE dtpt02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
150 CHARACTER DIAG, TRANS, UPLO
151 INTEGER LDB, LDX, N, NRHS
152 DOUBLE PRECISION RESID
155 DOUBLE PRECISION AP( * ), B( ldb, * ), WORK( * ), X( ldx, * )
161 DOUBLE PRECISION ZERO, ONE
162 parameter ( zero = 0.0d+0, one = 1.0d+0 )
166 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
170 DOUBLE PRECISION DASUM, DLAMCH, DLANTP
171 EXTERNAL lsame, dasum, dlamch, dlantp
183 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
190 IF( lsame( trans,
'N' ) )
THEN
191 anorm = dlantp(
'1', uplo, diag, n, ap, work )
193 anorm = dlantp(
'I', uplo, diag, n, ap, work )
198 eps = dlamch(
'Epsilon' )
199 IF( anorm.LE.zero )
THEN
209 CALL dcopy( n, x( 1, j ), 1, work, 1 )
210 CALL dtpmv( uplo, trans, diag, n, ap, work, 1 )
211 CALL daxpy( n, -one, b( 1, j ), 1, work, 1 )
212 bnorm = dasum( n, work, 1 )
213 xnorm = dasum( n, x( 1, j ), 1 )
214 IF( xnorm.LE.zero )
THEN
217 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
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 dtpmv(UPLO, TRANS, DIAG, N, AP, X, INCX)
DTPMV