163 SUBROUTINE zpot05( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
164 $ LDXACT, FERR, BERR, RESLTS )
172 INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
175 DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
176 COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * ),
183 DOUBLE PRECISION ZERO, ONE
184 parameter( zero = 0.0d+0, one = 1.0d+0 )
188 INTEGER I, IMAX, J, K
189 DOUBLE PRECISION AXBI, DIFF, EPS, ERRBND, OVFL, TMP, UNFL, XNORM
195 DOUBLE PRECISION DLAMCH
196 EXTERNAL lsame, izamax, dlamch
199 INTRINSIC abs, dble, dimag, max, min
202 DOUBLE PRECISION CABS1
205 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
211 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
217 eps = dlamch(
'Epsilon' )
218 unfl = dlamch(
'Safe minimum' )
220 upper = lsame( uplo,
'U' )
228 imax = izamax( n, x( 1, j ), 1 )
229 xnorm = max( cabs1( x( imax, j ) ), unfl )
232 diff = max( diff, cabs1( x( i, j )-xact( i, j ) ) )
235 IF( xnorm.GT.one )
THEN
237 ELSE IF( diff.LE.ovfl*xnorm )
THEN
245 IF( diff / xnorm.LE.ferr( j ) )
THEN
246 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
258 tmp = cabs1( b( i, k ) )
261 tmp = tmp + cabs1( a( j, i ) )*cabs1( x( j, k ) )
263 tmp = tmp + abs( dble( a( i, i ) ) )*cabs1( x( i, k ) )
265 tmp = tmp + cabs1( a( i, j ) )*cabs1( x( j, k ) )
269 tmp = tmp + cabs1( a( i, j ) )*cabs1( x( j, k ) )
271 tmp = tmp + abs( dble( a( i, i ) ) )*cabs1( x( i, k ) )
273 tmp = tmp + cabs1( a( j, i ) )*cabs1( x( j, k ) )
279 axbi = min( axbi, tmp )
282 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
283 $ max( axbi, ( n+1 )*unfl ) )
287 reslts( 2 ) = max( reslts( 2 ), tmp )
subroutine zpot05(uplo, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZPOT05