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
148 REAL CLANGE, SCASUM, SLAMCH
149 EXTERNAL clange, scasum, slamch
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 )
subroutine cgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
CGEMV
subroutine ccopy(N, CX, INCX, CY, INCY)
CCOPY
subroutine cbdt02(M, N, B, LDB, C, LDC, U, LDU, WORK, RWORK, RESID)
CBDT02