1 SUBROUTINE dget04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
8 INTEGER ldx, ldxact, n, nrhs
9 DOUBLE PRECISION rcond, resid
12 DOUBLE PRECISION x( ldx, * ), xact( ldxact, * )
60 parameter( zero = 0.0d+0 )
64 DOUBLE PRECISION diffnm, eps, xnorm
68 DOUBLE PRECISION dlamch
69 EXTERNAL idamax, dlamch
78 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
85 eps = dlamch(
'Epsilon' )
86 IF( rcond.LT.zero )
THEN
97 ix = idamax( n, xact( 1, j ), 1 )
98 xnorm = abs( xact( ix, j ) )
101 diffnm =
max( diffnm, abs( x( i, j )-xact( i, j ) ) )
103 IF( xnorm.LE.zero )
THEN
105 $ resid = 1.0d0 / eps
107 resid =
max( resid, ( diffnm / xnorm )*rcond )
110 IF( resid*eps.LT.1.0d0 )
111 $ resid = resid / eps