119 SUBROUTINE cbdt02( M, N, B, LDB, C, LDC, U, LDU, WORK, RWORK,
128 INTEGER ldb, ldc, ldu, m, n
133 COMPLEX b( ldb, * ), c( ldc, * ), u( ldu, * ),
141 parameter( zero = 0.0e+0, one = 1.0e+0 )
145 REAL bnorm, eps, realmn
155 INTRINSIC cmplx, max, min, real
162 IF( m.LE.0 .OR. n.LE.0 )
164 realmn =
REAL( MAX( M, N ) )
165 eps =
slamch(
'Precision' )
170 CALL
ccopy( m, b( 1, j ), 1, work, 1 )
171 CALL
cgemv(
'No transpose', m, m, -cmplx( one ), u, ldu,
172 $ c( 1, j ), 1, cmplx( one ), work, 1 )
173 resid = max( resid,
scasum( m, work, 1 ) )
178 bnorm =
clange(
'1', m, n, b, ldb, rwork )
180 IF( bnorm.LE.zero )
THEN
184 IF( bnorm.GE.resid )
THEN
185 resid = ( resid / bnorm ) / ( realmn*eps )
187 IF( bnorm.LT.one )
THEN
188 resid = ( min( resid, realmn*bnorm ) / bnorm ) /
191 resid = min( resid / bnorm, realmn ) / ( realmn*eps )