176 SUBROUTINE dgbt05( 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 DOUBLE PRECISION AB( ldab, * ), B( ldb, * ), BERR( * ),
190 $ ferr( * ), reslts( * ), x( ldx, * ),
197 DOUBLE PRECISION ZERO, ONE
198 parameter ( zero = 0.0d+0, one = 1.0d+0 )
202 INTEGER I, IMAX, J, K, NZ
203 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
208 DOUBLE PRECISION DLAMCH
209 EXTERNAL lsame, idamax, dlamch
212 INTRINSIC abs, max, min
218 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
224 eps = dlamch(
'Epsilon' )
225 unfl = dlamch(
'Safe minimum' )
227 notran = lsame( trans,
'N' )
228 nz = min( kl+ku+2, n+1 )
236 imax = idamax( 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 )
subroutine dgbt05(TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
DGBT05