163 SUBROUTINE zgtt05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
164 $ XACT, LDXACT, FERR, BERR, RESLTS )
172 INTEGER LDB, LDX, LDXACT, N, NRHS
175 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
176 COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ),
177 $ x( ldx, * ), xact( ldxact, * )
183 DOUBLE PRECISION ZERO, ONE
184 parameter( zero = 0.0d+0, one = 1.0d+0 )
188 INTEGER I, IMAX, J, K, NZ
189 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
195 DOUBLE PRECISION DLAMCH
196 EXTERNAL lsame, izamax, dlamch
199 INTRINSIC abs, dble, dimag, max, min
202 DOUBLE PRECISION CABS1
205 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
211 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
217 eps = dlamch(
'Epsilon' )
218 unfl = dlamch(
'Safe minimum' )
220 notran = lsame( trans,
'N' )
229 imax = izamax( 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 zgtt05(trans, n, nrhs, dl, d, du, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZGTT05