133 SUBROUTINE cbdt03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
142 INTEGER KD, LDU, LDVT, N
146 REAL D( * ), E( * ), S( * )
147 COMPLEX U( LDU, * ), VT( LDVT, * ), WORK( * )
154 parameter( zero = 0.0e+0, one = 1.0e+0 )
164 EXTERNAL lsame, isamax, scasum, slamch
170 INTRINSIC abs, cmplx, max, min, real
187 IF( lsame( uplo,
'U' ) )
THEN
193 work( n+i ) = s( i )*vt( i, j )
195 CALL cgemv(
'No transpose', n, n, -cmplx( one ), u, ldu,
196 $ work( n+1 ), 1, cmplx( zero ), work, 1 )
197 work( j ) = work( j ) + d( j )
199 work( j-1 ) = work( j-1 ) + e( j-1 )
200 bnorm = max( bnorm, abs( d( j ) )+abs( e( j-1 ) ) )
202 bnorm = max( bnorm, abs( d( j ) ) )
204 resid = max( resid, scasum( n, work, 1 ) )
212 work( n+i ) = s( i )*vt( i, j )
214 CALL cgemv(
'No transpose', n, n, -cmplx( one ), u, ldu,
215 $ work( n+1 ), 1, cmplx( zero ), work, 1 )
216 work( j ) = work( j ) + d( j )
218 work( j+1 ) = work( j+1 ) + e( j )
219 bnorm = max( bnorm, abs( d( j ) )+abs( e( j ) ) )
221 bnorm = max( bnorm, abs( d( j ) ) )
223 resid = max( resid, scasum( n, work, 1 ) )
232 work( n+i ) = s( i )*vt( i, j )
234 CALL cgemv(
'No transpose', n, n, -cmplx( one ), u, ldu,
235 $ work( n+1 ), 1, cmplx( zero ), work, 1 )
236 work( j ) = work( j ) + d( j )
237 resid = max( resid, scasum( n, work, 1 ) )
239 j = isamax( n, d, 1 )
240 bnorm = abs( d( j ) )
245 eps = slamch(
'Precision' )
247 IF( bnorm.LE.zero )
THEN
251 IF( bnorm.GE.resid )
THEN
252 resid = ( resid / bnorm ) / ( real( n )*eps )
254 IF( bnorm.LT.one )
THEN
255 resid = ( min( resid, real( n )*bnorm ) / bnorm ) /
258 resid = min( resid / bnorm, real( n ) ) /
subroutine cbdt03(uplo, n, kd, d, e, u, ldu, s, vt, ldvt, work, resid)
CBDT03
subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV