160 SUBROUTINE zunt03( 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
170 DOUBLE PRECISION RESULT
173 DOUBLE PRECISION RWORK( * )
174 COMPLEX*16 U( LDU, * ), V( LDV, * ), WORK( * )
181 DOUBLE PRECISION ZERO, ONE
182 parameter( zero = 0.0d0, one = 1.0d0 )
185 INTEGER I, IRC, J, LMX
186 DOUBLE PRECISION RES1, RES2, ULP
192 DOUBLE PRECISION DLAMCH
193 EXTERNAL lsame, izamax, dlamch
196 INTRINSIC abs, dble, dcmplx, max, min
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(
'ZUNT03', -info )
238 IF( mu.EQ.0 .OR. mv.EQ.0 .OR. n.EQ.0 )
243 ulp = dlamch(
'Precision' )
251 lmx = izamax( n, u( i, 1 ), ldu )
252 IF( v( i, lmx ).EQ.dcmplx( zero ) )
THEN
255 sv = abs( v( i, lmx ) ) / v( i, lmx )
257 IF( u( i, lmx ).EQ.dcmplx( 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 / ( dble( n )*ulp )
271 CALL zunt01(
'Rows', mv, n, v, ldv, work, lwork, rwork, res2 )
279 lmx = izamax( n, u( 1, i ), 1 )
280 IF( v( lmx, i ).EQ.dcmplx( zero ) )
THEN
283 sv = abs( v( lmx, i ) ) / v( lmx, i )
285 IF( u( lmx, i ).EQ.dcmplx( 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 / ( dble( n )*ulp )
299 CALL zunt01(
'Columns', n, mv, v, ldv, work, lwork, rwork,
303 result = min( max( res1, res2 ), one / ulp )
subroutine xerbla(srname, info)
subroutine zunt01(rowcol, m, n, u, ldu, work, lwork, rwork, resid)
ZUNT01
subroutine zunt03(rc, mu, mv, n, k, u, ldu, v, ldv, work, lwork, rwork, result, info)
ZUNT03