169 SUBROUTINE cpbt05( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX,
170 $ XACT, LDXACT, FERR, BERR, RESLTS )
178 INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
181 REAL BERR( * ), FERR( * ), RESLTS( * )
182 COMPLEX AB( LDAB, * ), B( LDB, * ), X( LDX, * ),
190 parameter( zero = 0.0e+0, one = 1.0e+0 )
194 INTEGER I, IMAX, J, K, NZ
195 REAL AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
202 EXTERNAL lsame, icamax, slamch
205 INTRINSIC abs, aimag, max, min, real
211 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
217 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
223 eps = slamch(
'Epsilon' )
224 unfl = slamch(
'Safe minimum' )
226 upper = lsame( uplo,
'U' )
227 nz = 2*max( kd, n-1 ) + 1
235 imax = icamax( n, x( 1, j ), 1 )
236 xnorm = max( cabs1( x( imax, j ) ), unfl )
239 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
242 IF( xnorm.GT.one )
THEN
244 ELSE IF( diff.LE.ovfl*xnorm )
THEN
252 IF( diff / xnorm.LE.ferr( j ) )
THEN
253 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
265 tmp = cabs1( b( i, k ) )
267 DO 40 j = max( i-kd, 1 ), i - 1
268 tmp = tmp + cabs1( ab( kd+1-i+j, i ) )*
271 tmp = tmp + abs( real( ab( kd+1, i ) ) )*
273 DO 50 j = i + 1, min( i+kd, n )
274 tmp = tmp + cabs1( ab( kd+1+i-j, j ) )*
278 DO 60 j = max( i-kd, 1 ), i - 1
279 tmp = tmp + cabs1( ab( 1+i-j, j ) )*cabs1( x( j, k ) )
281 tmp = tmp + abs( real( ab( 1, i ) ) )*cabs1( x( i, k ) )
282 DO 70 j = i + 1, min( i+kd, n )
283 tmp = tmp + cabs1( ab( 1+j-i, i ) )*cabs1( x( j, k ) )
289 axbi = min( axbi, tmp )
292 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
296 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine cpbt05(uplo, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
CPBT05