169 SUBROUTINE zpbt05( 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 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
182 COMPLEX*16 AB( LDAB, * ), B( LDB, * ), X( LDX, * ),
189 DOUBLE PRECISION ZERO, ONE
190 parameter( zero = 0.0d+0, one = 1.0d+0 )
194 INTEGER I, IMAX, J, K, NZ
195 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
201 DOUBLE PRECISION DLAMCH
202 EXTERNAL lsame, izamax, dlamch
205 INTRINSIC abs, dble, dimag, max, min
208 DOUBLE PRECISION CABS1
211 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
217 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
223 eps = dlamch(
'Epsilon' )
224 unfl = dlamch(
'Safe minimum' )
226 upper = lsame( uplo,
'U' )
227 nz = 2*max( kd, n-1 ) + 1
235 imax = izamax( 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( dble( 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( dble( 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 zpbt05(uplo, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZPBT05