112 SUBROUTINE sbdt02( M, N, B, LDB, C, LDC, U, LDU, WORK, RESID )
120 INTEGER LDB, LDC, LDU, M, N
124 REAL B( ldb, * ), C( ldc, * ), U( ldu, * ),
132 parameter ( zero = 0.0e+0, one = 1.0e+0 )
136 REAL BNORM, EPS, REALMN
139 REAL SASUM, SLAMCH, SLANGE
140 EXTERNAL sasum, slamch, slange
146 INTRINSIC max, min, real
153 IF( m.LE.0 .OR. n.LE.0 )
155 realmn =
REAL( MAX( M, N ) )
156 eps = slamch(
'Precision' )
161 CALL scopy( m, b( 1, j ), 1, work, 1 )
162 CALL sgemv(
'No transpose', m, m, -one, u, ldu, c( 1, j ), 1,
164 resid = max( resid, sasum( m, work, 1 ) )
169 bnorm = slange(
'1', m, n, b, ldb, work )
171 IF( bnorm.LE.zero )
THEN
175 IF( bnorm.GE.resid )
THEN
176 resid = ( resid / bnorm ) / ( realmn*eps )
178 IF( bnorm.LT.one )
THEN
179 resid = ( min( resid, realmn*bnorm ) / bnorm ) /
182 resid = min( resid / bnorm, realmn ) / ( realmn*eps )
subroutine sgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
SGEMV
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY
subroutine sbdt02(M, N, B, LDB, C, LDC, U, LDU, WORK, RESID)
SBDT02