159 SUBROUTINE dtpt03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
160 $ TSCAL, X, LDX, B, LDB, WORK, RESID )
167 CHARACTER DIAG, TRANS, UPLO
168 INTEGER LDB, LDX, N, NRHS
169 DOUBLE PRECISION RESID, SCALE, TSCAL
172 DOUBLE PRECISION AP( * ), B( LDB, * ), CNORM( * ), WORK( * ),
179 DOUBLE PRECISION ONE, ZERO
180 parameter( one = 1.0d+0, zero = 0.0d+0 )
184 DOUBLE PRECISION BIGNUM, EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
189 DOUBLE PRECISION DLAMCH
190 EXTERNAL lsame, idamax, dlamch
196 INTRINSIC abs, dble, max
202 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
206 eps = dlamch(
'Epsilon' )
207 smlnum = dlamch(
'Safe minimum' )
208 bignum = one / smlnum
214 IF( lsame( diag,
'N' ) )
THEN
215 IF( lsame( uplo,
'U' ) )
THEN
218 tnorm = max( tnorm, tscal*abs( ap( jj ) )+cnorm( j ) )
224 tnorm = max( tnorm, tscal*abs( ap( jj ) )+cnorm( j ) )
230 tnorm = max( tnorm, tscal+cnorm( j ) )
239 CALL dcopy( n, x( 1, j ), 1, work, 1 )
240 ix = idamax( n, work, 1 )
241 xnorm = max( one, abs( x( ix, j ) ) )
242 xscal = ( one / xnorm ) / dble( n )
243 CALL dscal( n, xscal, work, 1 )
244 CALL dtpmv( uplo, trans, diag, n, ap, work, 1 )
245 CALL daxpy( n, -scale*xscal, b( 1, j ), 1, work, 1 )
246 ix = idamax( n, work, 1 )
247 err = tscal*abs( work( ix ) )
248 ix = idamax( n, x( 1, j ), 1 )
249 xnorm = abs( x( ix, j ) )
250 IF( err*smlnum.LE.xnorm )
THEN
257 IF( err*smlnum.LE.tnorm )
THEN
264 resid = max( resid, err )
subroutine dtpt03(uplo, trans, diag, n, nrhs, ap, scale, cnorm, tscal, x, ldx, b, ldb, work, resid)
DTPT03