171 SUBROUTINE ctrt03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
172 $ cnorm, tscal, x, ldx, b, ldb, work, resid )
180 CHARACTER DIAG, TRANS, UPLO
181 INTEGER LDA, LDB, LDX, N, NRHS
182 REAL RESID, SCALE, TSCAL
186 COMPLEX A( lda, * ), B( ldb, * ), WORK( * ),
194 parameter ( one = 1.0e+0, zero = 0.0e+0 )
198 REAL EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
204 EXTERNAL lsame, icamax, slamch
210 INTRINSIC abs, cmplx, max, real
216 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
220 eps = slamch(
'Epsilon' )
221 smlnum = slamch(
'Safe minimum' )
227 IF( lsame( diag,
'N' ) )
THEN
229 tnorm = max( tnorm, tscal*abs( a( j, j ) )+cnorm( j ) )
233 tnorm = max( tnorm, tscal+cnorm( j ) )
242 CALL ccopy( n, x( 1, j ), 1, work, 1 )
243 ix = icamax( n, work, 1 )
244 xnorm = max( one, abs( x( ix, j ) ) )
245 xscal = ( one / xnorm ) /
REAL( n )
246 CALL csscal( n, xscal, work, 1 )
247 CALL ctrmv( uplo, trans, diag, n, a, lda, work, 1 )
248 CALL caxpy( n, cmplx( -scale*xscal ), b( 1, j ), 1, work, 1 )
249 ix = icamax( n, work, 1 )
250 err = tscal*abs( work( ix ) )
251 ix = icamax( 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 ctrt03(UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID)
CTRT03
subroutine ctrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
CTRMV
subroutine ccopy(N, CX, INCX, CY, INCY)
CCOPY
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
subroutine csscal(N, SA, CX, INCX)
CSSCAL