162 SUBROUTINE ztpt03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
163 $ tscal, x, ldx, b, ldb, work, resid )
171 CHARACTER DIAG, TRANS, UPLO
172 INTEGER LDB, LDX, N, NRHS
173 DOUBLE PRECISION RESID, SCALE, TSCAL
176 DOUBLE PRECISION CNORM( * )
177 COMPLEX*16 AP( * ), B( ldb, * ), WORK( * ), X( ldx, * )
183 DOUBLE PRECISION ONE, ZERO
184 parameter ( one = 1.0d+0, zero = 0.0d+0 )
188 DOUBLE PRECISION EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
193 DOUBLE PRECISION DLAMCH
194 EXTERNAL lsame, izamax, dlamch
200 INTRINSIC abs, dble, dcmplx, max
206 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
210 eps = dlamch(
'Epsilon' )
211 smlnum = dlamch(
'Safe minimum' )
217 IF( lsame( diag,
'N' ) )
THEN
218 IF( lsame( uplo,
'U' ) )
THEN
221 tnorm = max( tnorm, tscal*abs( ap( jj ) )+cnorm( j ) )
227 tnorm = max( tnorm, tscal*abs( ap( jj ) )+cnorm( j ) )
233 tnorm = max( tnorm, tscal+cnorm( j ) )
242 CALL zcopy( n, x( 1, j ), 1, work, 1 )
243 ix = izamax( n, work, 1 )
244 xnorm = max( one, abs( x( ix, j ) ) )
245 xscal = ( one / xnorm ) / dble( n )
246 CALL zdscal( n, xscal, work, 1 )
247 CALL ztpmv( uplo, trans, diag, n, ap, work, 1 )
248 CALL zaxpy( n, dcmplx( -scale*xscal ), b( 1, j ), 1, work, 1 )
249 ix = izamax( n, work, 1 )
250 err = tscal*abs( work( ix ) )
251 ix = izamax( n, x( 1, j ), 1 )
252 xnorm = abs( x( ix, j ) )
253 IF( err*smlnum.LE.xnorm )
THEN
260 IF( err*smlnum.LE.tnorm )
THEN
267 resid = max( resid, err )
subroutine zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
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
subroutine zdscal(N, DA, ZX, INCX)
ZDSCAL
subroutine zaxpy(N, ZA, ZX, INCX, ZY, INCY)
ZAXPY