189 SUBROUTINE ztbt05( 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 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
203 COMPLEX*16 AB( ldab, * ), B( ldb, * ), X( ldx, * ),
210 DOUBLE PRECISION ZERO, ONE
211 parameter ( zero = 0.0d+0, one = 1.0d+0 )
214 LOGICAL NOTRAN, UNIT, UPPER
215 INTEGER I, IFU, IMAX, J, K, NZ
216 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
222 DOUBLE PRECISION DLAMCH
223 EXTERNAL lsame, izamax, dlamch
226 INTRINSIC abs, dble, dimag, max, min
229 DOUBLE PRECISION CABS1
232 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
238 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
244 eps = dlamch(
'Epsilon' )
245 unfl = dlamch(
'Safe minimum' )
247 upper = lsame( uplo,
'U' )
248 notran = lsame( trans,
'N' )
249 unit = lsame( diag,
'U' )
250 nz = min( kd, n-1 ) + 1
258 imax = izamax( n, x( 1, j ), 1 )
259 xnorm = max( cabs1( x( imax, j ) ), unfl )
262 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
265 IF( xnorm.GT.one )
THEN
267 ELSE IF( diff.LE.ovfl*xnorm )
THEN
275 IF( diff / xnorm.LE.ferr( j ) )
THEN
276 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
291 tmp = cabs1( b( i, k ) )
293 IF( .NOT.notran )
THEN
294 DO 40 j = max( i-kd, 1 ), i - ifu
295 tmp = tmp + cabs1( ab( kd+1-i+j, i ) )*
299 $ tmp = tmp + cabs1( x( i, k ) )
302 $ tmp = tmp + cabs1( x( i, k ) )
303 DO 50 j = i + ifu, min( i+kd, n )
304 tmp = tmp + cabs1( ab( kd+1+i-j, j ) )*
310 DO 60 j = max( i-kd, 1 ), i - ifu
311 tmp = tmp + cabs1( ab( 1+i-j, j ) )*
315 $ tmp = tmp + cabs1( x( i, k ) )
318 $ tmp = tmp + cabs1( x( i, k ) )
319 DO 70 j = i + ifu, min( i+kd, n )
320 tmp = tmp + cabs1( ab( 1+j-i, i ) )*
328 axbi = min( axbi, tmp )
331 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
335 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine ztbt05(UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
ZTBT05