161 SUBROUTINE dtpt03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
162 $ tscal, x, ldx, b, ldb, work, resid )
170 CHARACTER DIAG, TRANS, UPLO
171 INTEGER LDB, LDX, N, NRHS
172 DOUBLE PRECISION RESID, SCALE, TSCAL
175 DOUBLE PRECISION AP( * ), B( ldb, * ), CNORM( * ), WORK( * ),
182 DOUBLE PRECISION ONE, ZERO
183 parameter ( one = 1.0d+0, zero = 0.0d+0 )
187 DOUBLE PRECISION BIGNUM, EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
192 DOUBLE PRECISION DLAMCH
193 EXTERNAL lsame, idamax, dlamch
199 INTRINSIC abs, dble, max
205 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
209 eps = dlamch(
'Epsilon' )
210 smlnum = dlamch(
'Safe minimum' )
211 bignum = one / smlnum
212 CALL dlabad( smlnum, bignum )
218 IF( lsame( diag,
'N' ) )
THEN
219 IF( lsame( uplo,
'U' ) )
THEN
222 tnorm = max( tnorm, tscal*abs( ap( jj ) )+cnorm( j ) )
228 tnorm = max( tnorm, tscal*abs( ap( jj ) )+cnorm( j ) )
234 tnorm = max( tnorm, tscal+cnorm( j ) )
243 CALL dcopy( n, x( 1, j ), 1, work, 1 )
244 ix = idamax( n, work, 1 )
245 xnorm = max( one, abs( x( ix, j ) ) )
246 xscal = ( one / xnorm ) / dble( n )
247 CALL dscal( n, xscal, work, 1 )
248 CALL dtpmv( uplo, trans, diag, n, ap, work, 1 )
249 CALL daxpy( n, -scale*xscal, b( 1, j ), 1, work, 1 )
250 ix = idamax( n, work, 1 )
251 err = tscal*abs( work( ix ) )
252 ix = idamax( n, x( 1, j ), 1 )
253 xnorm = abs( x( ix, j ) )
254 IF( err*smlnum.LE.xnorm )
THEN
261 IF( err*smlnum.LE.tnorm )
THEN
268 resid = max( resid, err )
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
subroutine daxpy(N, DA, DX, INCX, DY, INCY)
DAXPY
subroutine dlabad(SMALL, LARGE)
DLABAD
subroutine dscal(N, DA, DX, INCX)
DSCAL
subroutine dtpt03(UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID)
DTPT03
subroutine dtpmv(UPLO, TRANS, DIAG, N, AP, X, INCX)
DTPMV