187 SUBROUTINE ctbt05( 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 REAL BERR( * ), FERR( * ), RESLTS( * )
200 COMPLEX AB( LDAB, * ), B( LDB, * ), X( LDX, * ),
208 parameter( zero = 0.0e+0, one = 1.0e+0 )
211 LOGICAL NOTRAN, UNIT, UPPER
212 INTEGER I, IFU, IMAX, J, K, NZ
213 REAL AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
220 EXTERNAL lsame, icamax, slamch
223 INTRINSIC abs, aimag, max, min, real
229 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
235 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
241 eps = slamch(
'Epsilon' )
242 unfl = slamch(
'Safe minimum' )
244 upper = lsame( uplo,
'U' )
245 notran = lsame( trans,
'N' )
246 unit = lsame( diag,
'U' )
247 nz = min( kd, n-1 ) + 1
255 imax = icamax( n, x( 1, j ), 1 )
256 xnorm = max( cabs1( x( imax, j ) ), unfl )
259 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
262 IF( xnorm.GT.one )
THEN
264 ELSE IF( diff.LE.ovfl*xnorm )
THEN
272 IF( diff / xnorm.LE.ferr( j ) )
THEN
273 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
288 tmp = cabs1( b( i, k ) )
290 IF( .NOT.notran )
THEN
291 DO 40 j = max( i-kd, 1 ), i - ifu
292 tmp = tmp + cabs1( ab( kd+1-i+j, i ) )*
296 $ tmp = tmp + cabs1( x( i, k ) )
299 $ tmp = tmp + cabs1( x( i, k ) )
300 DO 50 j = i + ifu, min( i+kd, n )
301 tmp = tmp + cabs1( ab( kd+1+i-j, j ) )*
307 DO 60 j = max( i-kd, 1 ), i - ifu
308 tmp = tmp + cabs1( ab( 1+i-j, j ) )*
312 $ tmp = tmp + cabs1( x( i, k ) )
315 $ tmp = tmp + cabs1( x( i, k ) )
316 DO 70 j = i + ifu, min( i+kd, n )
317 tmp = tmp + cabs1( ab( 1+j-i, i ) )*
325 axbi = min( axbi, tmp )
328 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
332 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine ctbt05(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
CTBT05