118 SUBROUTINE zbdt02( M, N, B, LDB, C, LDC, U, LDU, WORK, RWORK,
126 INTEGER LDB, LDC, LDU, M, N
127 DOUBLE PRECISION RESID
130 DOUBLE PRECISION RWORK( * )
131 COMPLEX*16 B( LDB, * ), C( LDC, * ), U( LDU, * ),
138 DOUBLE PRECISION ZERO, ONE
139 parameter( zero = 0.0d+0, one = 1.0d+0 )
143 DOUBLE PRECISION BNORM, EPS, REALMN
146 DOUBLE PRECISION DLAMCH, DZASUM, ZLANGE
147 EXTERNAL dlamch, dzasum, zlange
153 INTRINSIC dble, dcmplx, max, min
160 IF( m.LE.0 .OR. n.LE.0 )
162 realmn = dble( max( m, n ) )
163 eps = dlamch(
'Precision' )
168 CALL zcopy( m, b( 1, j ), 1, work, 1 )
169 CALL zgemv(
'No transpose', m, m, -dcmplx( one ), u, ldu,
170 $ c( 1, j ), 1, dcmplx( one ), work, 1 )
171 resid = max( resid, dzasum( m, work, 1 ) )
176 bnorm = zlange(
'1', m, n, b, ldb, rwork )
178 IF( bnorm.LE.zero )
THEN
182 IF( bnorm.GE.resid )
THEN
183 resid = ( resid / bnorm ) / ( realmn*eps )
185 IF( bnorm.LT.one )
THEN
186 resid = ( min( resid, realmn*bnorm ) / bnorm ) /
189 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