112 SUBROUTINE dbdt02( M, N, B, LDB, C, LDC, U, LDU, WORK, RESID )
120 INTEGER LDB, LDC, LDU, M, N
121 DOUBLE PRECISION RESID
124 DOUBLE PRECISION B( ldb, * ), C( ldc, * ), U( ldu, * ),
131 DOUBLE PRECISION ZERO, ONE
132 parameter ( zero = 0.0d+0, one = 1.0d+0 )
136 DOUBLE PRECISION BNORM, EPS, REALMN
139 DOUBLE PRECISION DASUM, DLAMCH, DLANGE
140 EXTERNAL dasum, dlamch, dlange
146 INTRINSIC dble, max, min
153 IF( m.LE.0 .OR. n.LE.0 )
155 realmn = dble( max( m, n ) )
156 eps = dlamch(
'Precision' )
161 CALL dcopy( m, b( 1, j ), 1, work, 1 )
162 CALL dgemv(
'No transpose', m, m, -one, u, ldu, c( 1, j ), 1,
164 resid = max( resid, dasum( m, work, 1 ) )
169 bnorm = dlange(
'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 dcopy(N, DX, INCX, DY, INCY)
DCOPY
subroutine dgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
DGEMV
subroutine dbdt02(M, N, B, LDB, C, LDC, U, LDU, WORK, RESID)
DBDT02