182 SUBROUTINE ztrt05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
183 $ ldx, xact, ldxact, ferr, berr, reslts )
191 CHARACTER DIAG, TRANS, UPLO
192 INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
195 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
196 COMPLEX*16 A( lda, * ), B( ldb, * ), X( ldx, * ),
203 DOUBLE PRECISION ZERO, ONE
204 parameter ( zero = 0.0d+0, one = 1.0d+0 )
207 LOGICAL NOTRAN, UNIT, UPPER
208 INTEGER I, IFU, IMAX, J, K
209 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
215 DOUBLE PRECISION DLAMCH
216 EXTERNAL lsame, izamax, dlamch
219 INTRINSIC abs, dble, dimag, max, min
222 DOUBLE PRECISION CABS1
225 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
231 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
237 eps = dlamch(
'Epsilon' )
238 unfl = dlamch(
'Safe minimum' )
240 upper = lsame( uplo,
'U' )
241 notran = lsame( trans,
'N' )
242 unit = lsame( diag,
'U' )
250 imax = izamax( n, x( 1, j ), 1 )
251 xnorm = max( cabs1( x( imax, j ) ), unfl )
254 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
257 IF( xnorm.GT.one )
THEN
259 ELSE IF( diff.LE.ovfl*xnorm )
THEN
267 IF( diff / xnorm.LE.ferr( j ) )
THEN
268 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
283 tmp = cabs1( b( i, k ) )
285 IF( .NOT.notran )
THEN
287 tmp = tmp + cabs1( a( j, i ) )*cabs1( x( j, k ) )
290 $ tmp = tmp + cabs1( x( i, k ) )
293 $ tmp = tmp + cabs1( x( i, k ) )
295 tmp = tmp + cabs1( a( i, j ) )*cabs1( x( j, k ) )
301 tmp = tmp + cabs1( a( i, j ) )*cabs1( x( j, k ) )
304 $ tmp = tmp + cabs1( x( i, k ) )
307 $ tmp = tmp + cabs1( x( i, k ) )
309 tmp = tmp + cabs1( a( j, i ) )*cabs1( x( j, k ) )
316 axbi = min( axbi, tmp )
319 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
320 $ max( axbi, ( n+1 )*unfl ) )
324 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine ztrt05(UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
ZTRT05