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
195 DOUBLE PRECISION DLAMCH
196 EXTERNAL lsame, idamax, dlamch
199 INTRINSIC abs, max, min
205 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
211 eps = dlamch(
'Epsilon' )
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 )
subroutine dpot05(UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
DPOT05