112 SUBROUTINE dbdt02( M, N, B, LDB, C, LDC, U, LDU, WORK, RESID )
120 INTEGER ldb, ldc, ldu, m, n
121 DOUBLE PRECISION resid
124 DOUBLE PRECISION b( ldb, * ), c( ldc, * ), u( ldu, * ),
131 DOUBLE PRECISION zero, one
132 parameter( zero = 0.0d+0, one = 1.0d+0 )
136 DOUBLE PRECISION bnorm, eps, realmn
146 INTRINSIC dble, max, min
153 IF( m.LE.0 .OR. n.LE.0 )
155 realmn = dble( max( m, n ) )
156 eps =
dlamch(
'Precision' )
161 CALL
dcopy( m, b( 1, j ), 1, work, 1 )
162 CALL
dgemv(
'No transpose', m, m, -one, u, ldu, c( 1, j ), 1,
164 resid = max( resid,
dasum( m, work, 1 ) )
169 bnorm =
dlange(
'1', m, n, b, ldb, work )
171 IF( bnorm.LE.zero )
THEN
175 IF( bnorm.GE.resid )
THEN
176 resid = ( resid / bnorm ) / ( realmn*eps )
178 IF( bnorm.LT.one )
THEN
179 resid = ( min( resid, realmn*bnorm ) / bnorm ) /
182 resid = min( resid / bnorm, realmn ) / ( realmn*eps )