171 SUBROUTINE spbt05( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX,
172 $ xact, ldxact, ferr, berr, reslts )
181 INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
184 REAL AB( ldab, * ), B( ldb, * ), BERR( * ),
185 $ ferr( * ), reslts( * ), x( ldx, * ),
193 parameter ( zero = 0.0e+0, one = 1.0e+0 )
197 INTEGER I, IMAX, J, K, NZ
198 REAL AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
204 EXTERNAL lsame, isamax, slamch
207 INTRINSIC abs, max, min
213 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
219 eps = slamch(
'Epsilon' )
220 unfl = slamch(
'Safe minimum' )
222 upper = lsame( uplo,
'U' )
223 nz = 2*max( kd, n-1 ) + 1
231 imax = isamax( n, x( 1, j ), 1 )
232 xnorm = max( abs( x( imax, j ) ), unfl )
235 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
238 IF( xnorm.GT.one )
THEN
240 ELSE IF( diff.LE.ovfl*xnorm )
THEN
248 IF( diff / xnorm.LE.ferr( j ) )
THEN
249 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
261 tmp = abs( b( i, k ) )
263 DO 40 j = max( i-kd, 1 ), i
264 tmp = tmp + abs( ab( kd+1-i+j, i ) )*abs( x( j, k ) )
266 DO 50 j = i + 1, min( i+kd, n )
267 tmp = tmp + abs( ab( kd+1+i-j, j ) )*abs( x( j, k ) )
270 DO 60 j = max( i-kd, 1 ), i - 1
271 tmp = tmp + abs( ab( 1+i-j, j ) )*abs( x( j, k ) )
273 DO 70 j = i, min( i+kd, n )
274 tmp = tmp + abs( ab( 1+j-i, i ) )*abs( x( j, k ) )
280 axbi = min( axbi, tmp )
283 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
287 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine spbt05(UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
SPBT05