112 SUBROUTINE sbdt02( M, N, B, LDB, C, LDC, U, LDU, WORK, RESID )
120 INTEGER ldb, ldc, ldu, m, n
124 REAL b( ldb, * ), c( ldc, * ), u( ldu, * ),
132 parameter( zero = 0.0e+0, one = 1.0e+0 )
136 REAL bnorm, eps, realmn
146 INTRINSIC max, min, real
153 IF( m.LE.0 .OR. n.LE.0 )
155 realmn =
REAL( MAX( M, N ) )
156 eps =
slamch(
'Precision' )
161 CALL
scopy( m, b( 1, j ), 1, work, 1 )
162 CALL
sgemv(
'No transpose', m, m, -one, u, ldu, c( 1, j ), 1,
164 resid = max( resid,
sasum( m, work, 1 ) )
169 bnorm =
slange(
'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 )