165 SUBROUTINE zgtt05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
166 $ xact, ldxact, ferr, berr, reslts )
175 INTEGER LDB, LDX, LDXACT, N, NRHS
178 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
179 COMPLEX*16 B( ldb, * ), D( * ), DL( * ), DU( * ),
180 $ x( ldx, * ), xact( ldxact, * )
186 DOUBLE PRECISION ZERO, ONE
187 parameter ( zero = 0.0d+0, one = 1.0d+0 )
191 INTEGER I, IMAX, J, K, NZ
192 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
198 DOUBLE PRECISION DLAMCH
199 EXTERNAL lsame, izamax, dlamch
202 INTRINSIC abs, dble, dimag, max, min
205 DOUBLE PRECISION CABS1
208 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
214 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
220 eps = dlamch(
'Epsilon' )
221 unfl = dlamch(
'Safe minimum' )
223 notran = lsame( trans,
'N' )
232 imax = izamax( n, x( 1, j ), 1 )
233 xnorm = max( cabs1( x( imax, j ) ), unfl )
236 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
239 IF( xnorm.GT.one )
THEN
241 ELSE IF( diff.LE.ovfl*xnorm )
THEN
249 IF( diff / xnorm.LE.ferr( j ) )
THEN
250 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
263 axbi = cabs1( b( 1, k ) ) +
264 $ cabs1( d( 1 ) )*cabs1( x( 1, k ) )
266 axbi = cabs1( b( 1, k ) ) +
267 $ cabs1( d( 1 ) )*cabs1( x( 1, k ) ) +
268 $ cabs1( du( 1 ) )*cabs1( x( 2, k ) )
270 tmp = cabs1( b( i, k ) ) +
271 $ cabs1( dl( i-1 ) )*cabs1( x( i-1, k ) ) +
272 $ cabs1( d( i ) )*cabs1( x( i, k ) ) +
273 $ cabs1( du( i ) )*cabs1( x( i+1, k ) )
274 axbi = min( axbi, tmp )
276 tmp = cabs1( b( n, k ) ) + cabs1( dl( n-1 ) )*
277 $ cabs1( x( n-1, k ) ) + cabs1( d( n ) )*
279 axbi = min( axbi, tmp )
283 axbi = cabs1( b( 1, k ) ) +
284 $ cabs1( d( 1 ) )*cabs1( x( 1, k ) )
286 axbi = cabs1( b( 1, k ) ) +
287 $ cabs1( d( 1 ) )*cabs1( x( 1, k ) ) +
288 $ cabs1( dl( 1 ) )*cabs1( x( 2, k ) )
290 tmp = cabs1( b( i, k ) ) +
291 $ cabs1( du( i-1 ) )*cabs1( x( i-1, k ) ) +
292 $ cabs1( d( i ) )*cabs1( x( i, k ) ) +
293 $ cabs1( dl( i ) )*cabs1( x( i+1, k ) )
294 axbi = min( axbi, tmp )
296 tmp = cabs1( b( n, k ) ) + cabs1( du( n-1 ) )*
297 $ cabs1( x( n-1, k ) ) + cabs1( d( n ) )*
299 axbi = min( axbi, tmp )
302 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
306 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine zgtt05(TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
ZGTT05