176 SUBROUTINE cgbt05( TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X,
177 $ ldx, xact, ldxact, ferr, berr, reslts )
186 INTEGER kl, ku, ldab, ldb, ldx, ldxact, n, nrhs
189 REAL berr( * ), ferr( * ), reslts( * )
190 COMPLEX ab( ldab, * ), b( ldb, * ), x( ldx, * ),
198 parameter( zero = 0.0e+0, one = 1.0e+0 )
202 INTEGER i, imax, j, k, nz
203 REAL axbi, diff, eps, errbnd, ovfl, tmp, unfl, xnorm
213 INTRINSIC abs, aimag, max, min, real
219 cabs1( zdum ) = abs(
REAL( ZDUM ) ) + abs( aimag( zdum ) )
225 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
232 unfl =
slamch(
'Safe minimum' )
234 notran =
lsame( trans,
'N' )
235 nz = min( kl+ku+2, n+1 )
243 imax =
icamax( n, x( 1, j ), 1 )
244 xnorm = max( cabs1( x( imax, j ) ), unfl )
247 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
250 IF( xnorm.GT.one )
THEN
252 ELSE IF( diff.LE.ovfl*xnorm )
THEN
260 IF( diff / xnorm.LE.ferr( j ) )
THEN
261 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
273 tmp = cabs1( b( i, k ) )
275 DO 40 j = max( i-kl, 1 ), min( i+ku, n )
276 tmp = tmp + cabs1( ab( ku+1+i-j, j ) )*
280 DO 50 j = max( i-ku, 1 ), min( i+kl, n )
281 tmp = tmp + cabs1( ab( ku+1+j-i, i ) )*
288 axbi = min( axbi, tmp )
291 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
295 reslts( 2 ) = max( reslts( 2 ), tmp )