164 SUBROUTINE dpot05( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
165 $ ldxact, ferr, berr, reslts )
174 INTEGER lda, ldb, ldx, ldxact, n, nrhs
177 DOUBLE PRECISION a( lda, * ), b( ldb, * ), berr( * ), ferr( * ),
178 $ reslts( * ), x( ldx, * ), xact( ldxact, * )
184 DOUBLE PRECISION zero, one
185 parameter( zero = 0.0d+0, one = 1.0d+0 )
189 INTEGER i, imax, j, k
190 DOUBLE PRECISION axbi, diff, eps, errbnd, ovfl, tmp, unfl, xnorm
199 INTRINSIC abs, max, min
205 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
212 unfl =
dlamch(
'Safe minimum' )
214 upper =
lsame( uplo,
'U' )
222 imax =
idamax( n, x( 1, j ), 1 )
223 xnorm = max( abs( x( imax, j ) ), unfl )
226 diff = max( diff, abs( x( i, j )-xact( i, j ) ) )
229 IF( xnorm.GT.one )
THEN
231 ELSE IF( diff.LE.ovfl*xnorm )
THEN
239 IF( diff / xnorm.LE.ferr( j ) )
THEN
240 errbnd = max( errbnd, ( diff / xnorm ) / ferr( j ) )
252 tmp = abs( b( i, k ) )
255 tmp = tmp + abs( a( j, i ) )*abs( x( j, k ) )
258 tmp = tmp + abs( a( i, j ) )*abs( x( j, k ) )
262 tmp = tmp + abs( a( i, j ) )*abs( x( j, k ) )
265 tmp = tmp + abs( a( j, i ) )*abs( x( j, k ) )
271 axbi = min( axbi, tmp )
274 tmp = berr( k ) / ( ( n+1 )*eps+( n+1 )*unfl /
275 $ max( axbi, ( n+1 )*unfl ) )
279 reslts( 2 ) = max( reslts( 2 ), tmp )