169 SUBROUTINE dtrt03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
170 $ cnorm, tscal, x, ldx, b, ldb, work, resid )
178 CHARACTER DIAG, TRANS, UPLO
179 INTEGER LDA, LDB, LDX, N, NRHS
180 DOUBLE PRECISION RESID, SCALE, TSCAL
183 DOUBLE PRECISION A( lda, * ), B( ldb, * ), CNORM( * ),
184 $ work( * ), x( ldx, * )
190 DOUBLE PRECISION ONE, ZERO
191 parameter ( one = 1.0d+0, zero = 0.0d+0 )
195 DOUBLE PRECISION BIGNUM, EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
200 DOUBLE PRECISION DLAMCH
201 EXTERNAL lsame, idamax, dlamch
207 INTRINSIC abs, dble, max
213 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
217 eps = dlamch(
'Epsilon' )
218 smlnum = dlamch(
'Safe minimum' )
219 bignum = one / smlnum
220 CALL dlabad( smlnum, bignum )
226 IF( lsame( diag,
'N' ) )
THEN
228 tnorm = max( tnorm, tscal*abs( a( j, j ) )+cnorm( j ) )
232 tnorm = max( tnorm, tscal+cnorm( j ) )
241 CALL dcopy( n, x( 1, j ), 1, work, 1 )
242 ix = idamax( n, work, 1 )
243 xnorm = max( one, abs( x( ix, j ) ) )
244 xscal = ( one / xnorm ) / dble( n )
245 CALL dscal( n, xscal, work, 1 )
246 CALL dtrmv( uplo, trans, diag, n, a, lda, work, 1 )
247 CALL daxpy( n, -scale*xscal, b( 1, j ), 1, work, 1 )
248 ix = idamax( n, work, 1 )
249 err = tscal*abs( work( ix ) )
250 ix = idamax( n, x( 1, j ), 1 )
251 xnorm = abs( x( ix, j ) )
252 IF( err*smlnum.LE.xnorm )
THEN
259 IF( err*smlnum.LE.tnorm )
THEN
266 resid = max( resid, err )
subroutine dtrt03(UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID)
DTRT03
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
subroutine daxpy(N, DA, DX, INCX, DY, INCY)
DAXPY
subroutine dlabad(SMALL, LARGE)
DLABAD
subroutine dscal(N, DA, DX, INCX)
DSCAL
subroutine dtrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
DTRMV