180 SUBROUTINE ctrt05( 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 REAL BERR( * ), FERR( * ), RESLTS( * )
193 COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * ),
201 parameter( zero = 0.0e+0, one = 1.0e+0 )
204 LOGICAL NOTRAN, UNIT, UPPER
205 INTEGER I, IFU, IMAX, J, K
206 REAL AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
213 EXTERNAL lsame, icamax, slamch
216 INTRINSIC abs, aimag, max, min, real
222 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
228 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
234 eps = slamch(
'Epsilon' )
235 unfl = slamch(
'Safe minimum' )
237 upper = lsame( uplo,
'U' )
238 notran = lsame( trans,
'N' )
239 unit = lsame( diag,
'U' )
247 imax = icamax( 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 ctrt05(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
CTRT05