160 SUBROUTINE ztpt03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
161 $ TSCAL, X, LDX, B, LDB, WORK, RESID )
168 CHARACTER DIAG, TRANS, UPLO
169 INTEGER LDB, LDX, N, NRHS
170 DOUBLE PRECISION RESID, SCALE, TSCAL
173 DOUBLE PRECISION CNORM( * )
174 COMPLEX*16 AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
180 DOUBLE PRECISION ONE, ZERO
181 parameter( one = 1.0d+0, zero = 0.0d+0 )
185 DOUBLE PRECISION EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
190 DOUBLE PRECISION DLAMCH
191 EXTERNAL lsame, izamax, dlamch
197 INTRINSIC abs, dble, dcmplx, max
203 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
207 eps = dlamch(
'Epsilon' )
208 smlnum = dlamch(
'Safe minimum' )
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 zcopy( n, x( 1, j ), 1, work, 1 )
240 ix = izamax( n, work, 1 )
241 xnorm = max( one, abs( x( ix, j ) ) )
242 xscal = ( one / xnorm ) / dble( n )
243 CALL zdscal( n, xscal, work, 1 )
244 CALL ztpmv( uplo, trans, diag, n, ap, work, 1 )
245 CALL zaxpy( n, dcmplx( -scale*xscal ), b( 1, j ), 1, work, 1 )
246 ix = izamax( n, work, 1 )
247 err = tscal*abs( work( ix ) )
248 ix = izamax( 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 zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zdscal(n, da, zx, incx)
ZDSCAL
subroutine ztpmv(uplo, trans, diag, n, ap, x, incx)
ZTPMV
subroutine ztpt03(uplo, trans, diag, n, nrhs, ap, scale, cnorm, tscal, x, ldx, b, ldb, work, resid)
ZTPT03