169 SUBROUTINE ztrt03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
170 $ CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID )
177 CHARACTER DIAG, TRANS, UPLO
178 INTEGER LDA, LDB, LDX, N, NRHS
179 DOUBLE PRECISION RESID, SCALE, TSCAL
182 DOUBLE PRECISION CNORM( * )
183 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ),
190 DOUBLE PRECISION ONE, ZERO
191 parameter( one = 1.0d+0, zero = 0.0d+0 )
195 DOUBLE PRECISION EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
200 DOUBLE PRECISION DLAMCH
201 EXTERNAL lsame, izamax, dlamch
207 INTRINSIC abs, dble, dcmplx, max
213 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
217 eps = dlamch(
'Epsilon' )
218 smlnum = dlamch(
'Safe minimum' )
224 IF( lsame( diag,
'N' ) )
THEN
226 tnorm = max( tnorm, tscal*abs( a( j, j ) )+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 ztrmv( uplo, trans, diag, n, a, lda, 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 ztrmv(uplo, trans, diag, n, a, lda, x, incx)
ZTRMV
subroutine ztrt03(uplo, trans, diag, n, nrhs, a, lda, scale, cnorm, tscal, x, ldx, b, ldb, work, resid)
ZTRT03