179 SUBROUTINE dtrt05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
180 $ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
187 CHARACTER DIAG, TRANS, UPLO
188 INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
191 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
192 $ reslts( * ), x( ldx, * ), xact( ldxact, * )
198 DOUBLE PRECISION ZERO, ONE
199 parameter( zero = 0.0d+0, one = 1.0d+0 )
202 LOGICAL NOTRAN, UNIT, UPPER
203 INTEGER I, IFU, IMAX, J, K
204 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
209 DOUBLE PRECISION DLAMCH
210 EXTERNAL lsame, idamax, dlamch
213 INTRINSIC abs, max, min
219 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
225 eps = dlamch(
'Epsilon' )
226 unfl = dlamch(
'Safe minimum' )
228 upper = lsame( uplo,
'U' )
229 notran = lsame( trans,
'N' )
230 unit = lsame( diag,
'U' )
238 imax = idamax( n, x( 1, j ), 1 )
239 xnorm = max( abs( x( imax, j ) ), unfl )
242 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
245 IF( xnorm.GT.one )
THEN
247 ELSE IF( diff.LE.ovfl*xnorm )
THEN
255 IF( diff / xnorm.LE.ferr( j ) )
THEN
256 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
271 tmp = abs( b( i, k ) )
273 IF( .NOT.notran )
THEN
275 tmp = tmp + abs( a( j, i ) )*abs( x( j, k ) )
278 $ tmp = tmp + abs( x( i, k ) )
281 $ tmp = tmp + abs( x( i, k ) )
283 tmp = tmp + abs( a( i, j ) )*abs( x( j, k ) )
289 tmp = tmp + abs( a( i, j ) )*abs( x( j, k ) )
292 $ tmp = tmp + abs( x( i, k ) )
295 $ tmp = tmp + abs( x( i, k ) )
297 tmp = tmp + abs( a( j, i ) )*abs( x( j, k ) )
304 axbi = min( axbi, tmp )
307 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
308 $ max( axbi, ( n+1 )*unfl ) )
312 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine dtrt05(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
DTRT05