119 SUBROUTINE zbdt02( M, N, B, LDB, C, LDC, U, LDU, WORK, RWORK,
128 INTEGER LDB, LDC, LDU, M, N
129 DOUBLE PRECISION RESID
132 DOUBLE PRECISION RWORK( * )
133 COMPLEX*16 B( ldb, * ), C( ldc, * ), U( ldu, * ),
140 DOUBLE PRECISION ZERO, ONE
141 parameter ( zero = 0.0d+0, one = 1.0d+0 )
145 DOUBLE PRECISION BNORM, EPS, REALMN
148 DOUBLE PRECISION DLAMCH, DZASUM, ZLANGE
149 EXTERNAL dlamch, dzasum, zlange
155 INTRINSIC dble, dcmplx, max, min
162 IF( m.LE.0 .OR. n.LE.0 )
164 realmn = dble( max( m, n ) )
165 eps = dlamch(
'Precision' )
170 CALL zcopy( m, b( 1, j ), 1, work, 1 )
171 CALL zgemv(
'No transpose', m, m, -dcmplx( one ), u, ldu,
172 $ c( 1, j ), 1, dcmplx( one ), work, 1 )
173 resid = max( resid, dzasum( m, work, 1 ) )
178 bnorm = zlange(
'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 zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
subroutine zgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
ZGEMV
subroutine zbdt02(M, N, B, LDB, C, LDC, U, LDU, WORK, RWORK, RESID)
ZBDT02