163 SUBROUTINE cgtt05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
164 $ XACT, LDXACT, FERR, BERR, RESLTS )
172 INTEGER LDB, LDX, LDXACT, N, NRHS
175 REAL BERR( * ), FERR( * ), RESLTS( * )
176 COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ),
177 $ x( ldx, * ), xact( ldxact, * )
184 parameter( zero = 0.0e+0, one = 1.0e+0 )
188 INTEGER I, IMAX, J, K, NZ
189 REAL AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
196 EXTERNAL lsame, icamax, slamch
199 INTRINSIC abs, aimag, max, min, real
205 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
211 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
217 eps = slamch(
'Epsilon' )
218 unfl = slamch(
'Safe minimum' )
220 notran = lsame( trans,
'N' )
229 imax = icamax( n, x( 1, j ), 1 )
230 xnorm = max( cabs1( x( imax, j ) ), unfl )
233 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
236 IF( xnorm.GT.one )
THEN
238 ELSE IF( diff.LE.ovfl*xnorm )
THEN
246 IF( diff / xnorm.LE.ferr( j ) )
THEN
247 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
260 axbi = cabs1( b( 1, k ) ) +
261 $ cabs1( d( 1 ) )*cabs1( x( 1, k ) )
263 axbi = cabs1( b( 1, k ) ) +
264 $ cabs1( d( 1 ) )*cabs1( x( 1, k ) ) +
265 $ cabs1( du( 1 ) )*cabs1( x( 2, k ) )
267 tmp = cabs1( b( i, k ) ) +
268 $ cabs1( dl( i-1 ) )*cabs1( x( i-1, k ) ) +
269 $ cabs1( d( i ) )*cabs1( x( i, k ) ) +
270 $ cabs1( du( i ) )*cabs1( x( i+1, k ) )
271 axbi = min( axbi, tmp )
273 tmp = cabs1( b( n, k ) ) + cabs1( dl( n-1 ) )*
274 $ cabs1( x( n-1, k ) ) + cabs1( d( n ) )*
276 axbi = min( axbi, tmp )
280 axbi = cabs1( b( 1, k ) ) +
281 $ cabs1( d( 1 ) )*cabs1( x( 1, k ) )
283 axbi = cabs1( b( 1, k ) ) +
284 $ cabs1( d( 1 ) )*cabs1( x( 1, k ) ) +
285 $ cabs1( dl( 1 ) )*cabs1( x( 2, k ) )
287 tmp = cabs1( b( i, k ) ) +
288 $ cabs1( du( i-1 ) )*cabs1( x( i-1, k ) ) +
289 $ cabs1( d( i ) )*cabs1( x( i, k ) ) +
290 $ cabs1( dl( i ) )*cabs1( x( i+1, k ) )
291 axbi = min( axbi, tmp )
293 tmp = cabs1( b( n, k ) ) + cabs1( du( n-1 ) )*
294 $ cabs1( x( n-1, k ) ) + cabs1( d( n ) )*
296 axbi = min( axbi, tmp )
299 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
303 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine cgtt05(trans, n, nrhs, dl, d, du, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
CGTT05