133 SUBROUTINE sbdt03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
142 INTEGER KD, LDU, LDVT, N
146 REAL D( * ), E( * ), S( * ), U( LDU, * ),
147 $ vt( ldvt, * ), work( * )
154 parameter( zero = 0.0e+0, one = 1.0e+0 )
164 EXTERNAL lsame, isamax, sasum, slamch
170 INTRINSIC abs, max, min, real
187 IF( lsame( uplo,
'U' ) )
THEN
193 work( n+i ) = s( i )*vt( i, j )
195 CALL sgemv(
'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, sasum( n, work, 1 ) )
212 work( n+i ) = s( i )*vt( i, j )
214 CALL sgemv(
'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, sasum( n, work, 1 ) )
232 work( n+i ) = s( i )*vt( i, j )
234 CALL sgemv(
'No transpose', n, n, -one, u, ldu, work( n+1 ),
236 work( j ) = work( j ) + d( j )
237 resid = max( resid, sasum( 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 sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
SGEMV
subroutine sbdt03(uplo, n, kd, d, e, u, ldu, s, vt, ldvt, work, resid)
SBDT03