180 SUBROUTINE ztrt05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
181 $ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
188 CHARACTER DIAG, TRANS, UPLO
189 INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
192 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
193 COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * ),
200 DOUBLE PRECISION ZERO, ONE
201 parameter( zero = 0.0d+0, one = 1.0d+0 )
204 LOGICAL NOTRAN, UNIT, UPPER
205 INTEGER I, IFU, IMAX, J, K
206 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
212 DOUBLE PRECISION DLAMCH
213 EXTERNAL lsame, izamax, dlamch
216 INTRINSIC abs, dble, dimag, max, min
219 DOUBLE PRECISION CABS1
222 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
228 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
234 eps = dlamch(
'Epsilon' )
235 unfl = dlamch(
'Safe minimum' )
237 upper = lsame( uplo,
'U' )
238 notran = lsame( trans,
'N' )
239 unit = lsame( diag,
'U' )
247 imax = izamax( n, x( 1, j ), 1 )
248 xnorm = max( cabs1( x( imax, j ) ), unfl )
251 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
254 IF( xnorm.GT.one )
THEN
256 ELSE IF( diff.LE.ovfl*xnorm )
THEN
264 IF( diff / xnorm.LE.ferr( j ) )
THEN
265 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
280 tmp = cabs1( b( i, k ) )
282 IF( .NOT.notran )
THEN
284 tmp = tmp + cabs1( a( j, i ) )*cabs1( x( j, k ) )
287 $ tmp = tmp + cabs1( x( i, k ) )
290 $ tmp = tmp + cabs1( x( i, k ) )
292 tmp = tmp + cabs1( a( i, j ) )*cabs1( x( j, k ) )
298 tmp = tmp + cabs1( a( i, j ) )*cabs1( x( j, k ) )
301 $ tmp = tmp + cabs1( x( i, k ) )
304 $ tmp = tmp + cabs1( x( i, k ) )
306 tmp = tmp + cabs1( a( j, i ) )*cabs1( x( j, k ) )
313 axbi = min( axbi, tmp )
316 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
317 $ max( axbi, ( n+1 )*unfl ) )
321 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