187 SUBROUTINE dtbt05( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
188 $ LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS )
195 CHARACTER DIAG, TRANS, UPLO
196 INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
199 DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ), BERR( * ),
200 $ ferr( * ), reslts( * ), x( ldx, * ),
207 DOUBLE PRECISION ZERO, ONE
208 parameter( zero = 0.0d+0, one = 1.0d+0 )
211 LOGICAL NOTRAN, UNIT, UPPER
212 INTEGER I, IFU, IMAX, J, K, NZ
213 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
218 DOUBLE PRECISION DLAMCH
219 EXTERNAL lsame, idamax, dlamch
222 INTRINSIC abs, max, min
228 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
234 eps = dlamch(
'Epsilon' )
235 unfl = dlamch(
'Safe minimum' )
237 upper = lsame( uplo,
'U' )
238 notran = lsame( trans,
'N' )
239 unit = lsame( diag,
'U' )
240 nz = min( kd, n-1 ) + 1
248 imax = idamax( n, x( 1, j ), 1 )
249 xnorm = max( abs( x( imax, j ) ), unfl )
252 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
255 IF( xnorm.GT.one )
THEN
257 ELSE IF( diff.LE.ovfl*xnorm )
THEN
265 IF( diff / xnorm.LE.ferr( j ) )
THEN
266 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
281 tmp = abs( b( i, k ) )
283 IF( .NOT.notran )
THEN
284 DO 40 j = max( i-kd, 1 ), i - ifu
285 tmp = tmp + abs( ab( kd+1-i+j, i ) )*
289 $ tmp = tmp + abs( x( i, k ) )
292 $ tmp = tmp + abs( x( i, k ) )
293 DO 50 j = i + ifu, min( i+kd, n )
294 tmp = tmp + abs( ab( kd+1+i-j, j ) )*
300 DO 60 j = max( i-kd, 1 ), i - ifu
301 tmp = tmp + abs( ab( 1+i-j, j ) )*abs( x( j, k ) )
304 $ tmp = tmp + abs( x( i, k ) )
307 $ tmp = tmp + abs( x( i, k ) )
308 DO 70 j = i + ifu, min( i+kd, n )
309 tmp = tmp + abs( ab( 1+j-i, i ) )*abs( x( j, k ) )
316 axbi = min( axbi, tmp )
319 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
323 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine dtbt05(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
DTBT05