176 SUBROUTINE sgbt05( 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 ab( ldab, * ), b( ldb, * ), berr( * ),
190 $ ferr( * ), reslts( * ), 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
212 INTRINSIC abs, max, min
218 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
225 unfl =
slamch(
'Safe minimum' )
227 notran =
lsame( trans,
'N' )
228 nz = min( kl+ku+2, n+1 )
236 imax =
isamax( n, x( 1, j ), 1 )
237 xnorm = max( abs( x( imax, j ) ), unfl )
240 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
243 IF( xnorm.GT.one )
THEN
245 ELSE IF( diff.LE.ovfl*xnorm )
THEN
253 IF( diff / xnorm.LE.ferr( j ) )
THEN
254 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
266 tmp = abs( b( i, k ) )
268 DO 40 j = max( i-kl, 1 ), min( i+ku, n )
269 tmp = tmp + abs( ab( ku+1+i-j, j ) )*abs( x( j, k ) )
272 DO 50 j = max( i-ku, 1 ), min( i+kl, n )
273 tmp = tmp + abs( ab( ku+1+j-i, i ) )*abs( x( j, k ) )
279 axbi = min( axbi, tmp )
282 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
286 reslts( 2 ) = max( reslts( 2 ), tmp )