169 SUBROUTINE ctrt03( 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 REAL RESID, SCALE, TSCAL
183 COMPLEX A( LDA, * ), B( LDB, * ), WORK( * ),
191 parameter( one = 1.0e+0, zero = 0.0e+0 )
195 REAL EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
201 EXTERNAL lsame, icamax, slamch
207 INTRINSIC abs, cmplx, max, real
213 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
217 eps = slamch(
'Epsilon' )
218 smlnum = slamch(
'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 ccopy( n, x( 1, j ), 1, work, 1 )
240 ix = icamax( n, work, 1 )
241 xnorm = max( one, abs( x( ix, j ) ) )
242 xscal = ( one / xnorm ) / real( n )
243 CALL csscal( n, xscal, work, 1 )
244 CALL ctrmv( uplo, trans, diag, n, a, lda, work, 1 )
245 CALL caxpy( n, cmplx( -scale*xscal ), b( 1, j ), 1, work, 1 )
246 ix = icamax( n, work, 1 )
247 err = tscal*abs( work( ix ) )
248 ix = icamax( 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 ctrt03(uplo, trans, diag, n, nrhs, a, lda, scale, cnorm, tscal, x, ldx, b, ldb, work, resid)
CTRT03
subroutine caxpy(n, ca, cx, incx, cy, incy)
CAXPY
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine csscal(n, sa, cx, incx)
CSSCAL
subroutine ctrmv(uplo, trans, diag, n, a, lda, x, incx)
CTRMV