160 SUBROUTINE cunt03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
161 $ RWORK, RESULT, INFO )
169 INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
174 COMPLEX U( LDU, * ), V( LDV, * ), WORK( * )
182 parameter( zero = 0.0e0, one = 1.0e0 )
185 INTEGER I, IRC, J, LMX
193 EXTERNAL lsame, icamax, slamch
196 INTRINSIC abs, cmplx, max, min, real
206 IF( lsame( rc,
'R' ) )
THEN
208 ELSE IF( lsame( rc,
'C' ) )
THEN
215 ELSE IF( mu.LT.0 )
THEN
217 ELSE IF( mv.LT.0 )
THEN
219 ELSE IF( n.LT.0 )
THEN
221 ELSE IF( k.LT.0 .OR. k.GT.max( mu, mv ) )
THEN
223 ELSE IF( ( irc.EQ.0 .AND. ldu.LT.max( 1, mu ) ) .OR.
224 $ ( irc.EQ.1 .AND. ldu.LT.max( 1, n ) ) )
THEN
226 ELSE IF( ( irc.EQ.0 .AND. ldv.LT.max( 1, mv ) ) .OR.
227 $ ( irc.EQ.1 .AND. ldv.LT.max( 1, n ) ) )
THEN
231 CALL xerbla(
'CUNT03', -info )
238 IF( mu.EQ.0 .OR. mv.EQ.0 .OR. n.EQ.0 )
243 ulp = slamch(
'Precision' )
251 lmx = icamax( n, u( i, 1 ), ldu )
252 IF( v( i, lmx ).EQ.cmplx( zero ) )
THEN
255 sv = abs( v( i, lmx ) ) / v( i, lmx )
257 IF( u( i, lmx ).EQ.cmplx( zero ) )
THEN
260 su = abs( u( i, lmx ) ) / u( i, lmx )
264 res1 = max( res1, abs( u( i, j )-s*v( i, j ) ) )
267 res1 = res1 / ( real( n )*ulp )
271 CALL cunt01(
'Rows', mv, n, v, ldv, work, lwork, rwork, res2 )
279 lmx = icamax( n, u( 1, i ), 1 )
280 IF( v( lmx, i ).EQ.cmplx( zero ) )
THEN
283 sv = abs( v( lmx, i ) ) / v( lmx, i )
285 IF( u( lmx, i ).EQ.cmplx( zero ) )
THEN
288 su = abs( u( lmx, i ) ) / u( lmx, i )
292 res1 = max( res1, abs( u( j, i )-s*v( j, i ) ) )
295 res1 = res1 / ( real( n )*ulp )
299 CALL cunt01(
'Columns', n, mv, v, ldv, work, lwork, rwork,
303 result = min( max( res1, res2 ), one / ulp )
subroutine xerbla(srname, info)
subroutine cunt01(rowcol, m, n, u, ldu, work, lwork, rwork, resid)
CUNT01
subroutine cunt03(rc, mu, mv, n, k, u, ldu, v, ldv, work, lwork, rwork, result, info)
CUNT03