181 SUBROUTINE dtrt05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
182 $ ldx, xact, ldxact, ferr, berr, reslts )
190 CHARACTER DIAG, TRANS, UPLO
191 INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
194 DOUBLE PRECISION A( lda, * ), B( ldb, * ), BERR( * ), FERR( * ),
195 $ reslts( * ), x( ldx, * ), xact( ldxact, * )
201 DOUBLE PRECISION ZERO, ONE
202 parameter ( zero = 0.0d+0, one = 1.0d+0 )
205 LOGICAL NOTRAN, UNIT, UPPER
206 INTEGER I, IFU, IMAX, J, K
207 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
212 DOUBLE PRECISION DLAMCH
213 EXTERNAL lsame, idamax, dlamch
216 INTRINSIC abs, max, min
222 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
228 eps = dlamch(
'Epsilon' )
229 unfl = dlamch(
'Safe minimum' )
231 upper = lsame( uplo,
'U' )
232 notran = lsame( trans,
'N' )
233 unit = lsame( diag,
'U' )
241 imax = idamax( n, x( 1, j ), 1 )
242 xnorm = max( abs( x( imax, j ) ), unfl )
245 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
248 IF( xnorm.GT.one )
THEN
250 ELSE IF( diff.LE.ovfl*xnorm )
THEN
258 IF( diff / xnorm.LE.ferr( j ) )
THEN
259 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
274 tmp = abs( b( i, k ) )
276 IF( .NOT.notran )
THEN
278 tmp = tmp + abs( a( j, i ) )*abs( x( j, k ) )
281 $ tmp = tmp + abs( x( i, k ) )
284 $ tmp = tmp + abs( x( i, k ) )
286 tmp = tmp + abs( a( i, j ) )*abs( x( j, k ) )
292 tmp = tmp + abs( a( i, j ) )*abs( x( j, k ) )
295 $ tmp = tmp + abs( x( i, k ) )
298 $ tmp = tmp + abs( x( i, k ) )
300 tmp = tmp + abs( a( j, i ) )*abs( x( j, k ) )
307 axbi = min( axbi, tmp )
310 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
311 $ max( axbi, ( n+1 )*unfl ) )
315 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