189 SUBROUTINE stbt05( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
190 $ ldb, x, ldx, xact, ldxact, ferr, berr, reslts )
198 CHARACTER DIAG, TRANS, UPLO
199 INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
202 REAL AB( ldab, * ), B( ldb, * ), BERR( * ),
203 $ ferr( * ), reslts( * ), x( ldx, * ),
211 parameter ( zero = 0.0e+0, one = 1.0e+0 )
214 LOGICAL NOTRAN, UNIT, UPPER
215 INTEGER I, IFU, IMAX, J, K, NZ
216 REAL AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
222 EXTERNAL lsame, isamax, slamch
225 INTRINSIC abs, max, min
231 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
237 eps = slamch(
'Epsilon' )
238 unfl = slamch(
'Safe minimum' )
240 upper = lsame( uplo,
'U' )
241 notran = lsame( trans,
'N' )
242 unit = lsame( diag,
'U' )
243 nz = min( kd, n-1 ) + 1
251 imax = isamax( n, x( 1, j ), 1 )
252 xnorm = max( abs( x( imax, j ) ), unfl )
255 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
258 IF( xnorm.GT.one )
THEN
260 ELSE IF( diff.LE.ovfl*xnorm )
THEN
268 IF( diff / xnorm.LE.ferr( j ) )
THEN
269 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
284 tmp = abs( b( i, k ) )
286 IF( .NOT.notran )
THEN
287 DO 40 j = max( i-kd, 1 ), i - ifu
288 tmp = tmp + abs( ab( kd+1-i+j, i ) )*
292 $ tmp = tmp + abs( x( i, k ) )
295 $ tmp = tmp + abs( x( i, k ) )
296 DO 50 j = i + ifu, min( i+kd, n )
297 tmp = tmp + abs( ab( kd+1+i-j, j ) )*
303 DO 60 j = max( i-kd, 1 ), i - ifu
304 tmp = tmp + abs( ab( 1+i-j, j ) )*abs( x( j, k ) )
307 $ tmp = tmp + abs( x( i, k ) )
310 $ tmp = tmp + abs( x( i, k ) )
311 DO 70 j = i + ifu, min( i+kd, n )
312 tmp = tmp + abs( ab( 1+j-i, i ) )*abs( x( j, k ) )
319 axbi = min( axbi, tmp )
322 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
326 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine stbt05(UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
STBT05