171 SUBROUTINE zpbt05( 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 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
185 COMPLEX*16 AB( ldab, * ), B( ldb, * ), X( ldx, * ),
192 DOUBLE PRECISION ZERO, ONE
193 parameter ( zero = 0.0d+0, one = 1.0d+0 )
197 INTEGER I, IMAX, J, K, NZ
198 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
204 DOUBLE PRECISION DLAMCH
205 EXTERNAL lsame, izamax, dlamch
208 INTRINSIC abs, dble, dimag, max, min
211 DOUBLE PRECISION CABS1
214 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
220 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
226 eps = dlamch(
'Epsilon' )
227 unfl = dlamch(
'Safe minimum' )
229 upper = lsame( uplo,
'U' )
230 nz = 2*max( kd, n-1 ) + 1
238 imax = izamax( n, x( 1, j ), 1 )
239 xnorm = max( cabs1( x( imax, j ) ), unfl )
242 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
245 IF( xnorm.GT.one )
THEN
247 ELSE IF( diff.LE.ovfl*xnorm )
THEN
255 IF( diff / xnorm.LE.ferr( j ) )
THEN
256 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
268 tmp = cabs1( b( i, k ) )
270 DO 40 j = max( i-kd, 1 ), i - 1
271 tmp = tmp + cabs1( ab( kd+1-i+j, i ) )*
274 tmp = tmp + abs( dble( ab( kd+1, i ) ) )*
276 DO 50 j = i + 1, min( i+kd, n )
277 tmp = tmp + cabs1( ab( kd+1+i-j, j ) )*
281 DO 60 j = max( i-kd, 1 ), i - 1
282 tmp = tmp + cabs1( ab( 1+i-j, j ) )*cabs1( x( j, k ) )
284 tmp = tmp + abs( dble( ab( 1, i ) ) )*cabs1( x( i, k ) )
285 DO 70 j = i + 1, min( i+kd, n )
286 tmp = tmp + cabs1( ab( 1+j-i, i ) )*cabs1( x( j, k ) )
292 axbi = min( axbi, tmp )
295 tmp = berr( k ) / ( nz*eps+nz*unfl / max( axbi, nz*unfl ) )
299 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine zpbt05(UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
ZPBT05