133 SUBROUTINE dbdt03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
142 INTEGER KD, LDU, LDVT, N
143 DOUBLE PRECISION RESID
146 DOUBLE PRECISION D( * ), E( * ), S( * ), U( LDU, * ),
147 $ vt( ldvt, * ), work( * )
153 DOUBLE PRECISION ZERO, ONE
154 parameter( zero = 0.0d+0, one = 1.0d+0 )
158 DOUBLE PRECISION BNORM, EPS
163 DOUBLE PRECISION DASUM, DLAMCH
164 EXTERNAL lsame, idamax, dasum, dlamch
170 INTRINSIC abs, dble, max, min
187 IF( lsame( uplo,
'U' ) )
THEN
193 work( n+i ) = s( i )*vt( i, j )
195 CALL dgemv(
'No transpose', n, n, -one, u, ldu,
196 $ work( n+1 ), 1, 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, dasum( n, work, 1 ) )
212 work( n+i ) = s( i )*vt( i, j )
214 CALL dgemv(
'No transpose', n, n, -one, u, ldu,
215 $ work( n+1 ), 1, 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, dasum( n, work, 1 ) )
232 work( n+i ) = s( i )*vt( i, j )
234 CALL dgemv(
'No transpose', n, n, -one, u, ldu, work( n+1 ),
236 work( j ) = work( j ) + d( j )
237 resid = max( resid, dasum( n, work, 1 ) )
239 j = idamax( n, d, 1 )
240 bnorm = abs( d( j ) )
245 eps = dlamch(
'Precision' )
247 IF( bnorm.LE.zero )
THEN
251 IF( bnorm.GE.resid )
THEN
252 resid = ( resid / bnorm ) / ( dble( n )*eps )
254 IF( bnorm.LT.one )
THEN
255 resid = ( min( resid, dble( n )*bnorm ) / bnorm ) /
258 resid = min( resid / bnorm, dble( n ) ) /
subroutine dbdt03(uplo, n, kd, d, e, u, ldu, s, vt, ldvt, work, resid)
DBDT03
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV