174 SUBROUTINE zgbt05( TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X,
175 $ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
183 INTEGER KL, KU, LDAB, LDB, LDX, LDXACT, N, NRHS
186 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
187 COMPLEX*16 AB( LDAB, * ), B( LDB, * ), X( LDX, * ),
194 DOUBLE PRECISION ZERO, ONE
195 parameter( zero = 0.0d+0, one = 1.0d+0 )
199 INTEGER I, IMAX, J, K, NZ
200 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
206 DOUBLE PRECISION DLAMCH
207 EXTERNAL lsame, izamax, dlamch
210 INTRINSIC abs, dble, dimag, max, min
213 DOUBLE PRECISION CABS1
216 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
222 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
228 eps = dlamch(
'Epsilon' )
229 unfl = dlamch(
'Safe minimum' )
231 notran = lsame( trans,
'N' )
232 nz = min( kl+ku+2, n+1 )
240 imax = izamax( n, x( 1, j ), 1 )
241 xnorm = max( cabs1( x( imax, j ) ), unfl )
244 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
247 IF( xnorm.GT.one )
THEN
249 ELSE IF( diff.LE.ovfl*xnorm )
THEN
257 IF( diff / xnorm.LE.ferr( j ) )
THEN
258 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
270 tmp = cabs1( b( i, k ) )
272 DO 40 j = max( i-kl, 1 ), min( i+ku, n )
273 tmp = tmp + cabs1( ab( ku+1+i-j, j ) )*
277 DO 50 j = max( i-ku, 1 ), min( i+kl, n )
278 tmp = tmp + cabs1( ab( ku+1+j-i, i ) )*
285 axbi = min( axbi, tmp )
288 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
292 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine zgbt05(trans, n, kl, ku, nrhs, ab, ldab, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZGBT05