162 SUBROUTINE zunt03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
163 $ rwork, result, info )
172 INTEGER info, k, ldu, ldv, lwork, mu, mv, n
173 DOUBLE PRECISION result
176 DOUBLE PRECISION rwork( * )
177 COMPLEX*16 u( ldu, * ), v( ldv, * ), work( * )
184 DOUBLE PRECISION zero, one
185 parameter( zero = 0.0d0, one = 1.0d0 )
188 INTEGER i, irc, j, lmx
189 DOUBLE PRECISION res1, res2, ulp
199 INTRINSIC abs, dble, dcmplx, max, min
209 IF(
lsame( rc,
'R' ) )
THEN
211 ELSE IF(
lsame( rc,
'C' ) )
THEN
218 ELSE IF( mu.LT.0 )
THEN
220 ELSE IF( mv.LT.0 )
THEN
222 ELSE IF( n.LT.0 )
THEN
224 ELSE IF( k.LT.0 .OR. k.GT.max( mu, mv ) )
THEN
226 ELSE IF( ( irc.EQ.0 .AND. ldu.LT.max( 1, mu ) ) .OR.
227 $ ( irc.EQ.1 .AND. ldu.LT.max( 1, n ) ) )
THEN
229 ELSE IF( ( irc.EQ.0 .AND. ldv.LT.max( 1, mv ) ) .OR.
230 $ ( irc.EQ.1 .AND. ldv.LT.max( 1, n ) ) )
THEN
234 CALL
xerbla(
'ZUNT03', -info )
241 IF( mu.EQ.0 .OR. mv.EQ.0 .OR. n.EQ.0 )
246 ulp =
dlamch(
'Precision' )
254 lmx =
izamax( n, u( i, 1 ), ldu )
255 IF( v( i, lmx ).EQ.dcmplx( zero ) )
THEN
258 sv = abs( v( i, lmx ) ) / v( i, lmx )
260 IF( u( i, lmx ).EQ.dcmplx( zero ) )
THEN
263 su = abs( u( i, lmx ) ) / u( i, lmx )
267 res1 = max( res1, abs( u( i, j )-s*v( i, j ) ) )
270 res1 = res1 / ( dble( n )*ulp )
274 CALL
zunt01(
'Rows', mv, n, v, ldv, work, lwork, rwork, res2 )
282 lmx =
izamax( n, u( 1, i ), 1 )
283 IF( v( lmx, i ).EQ.dcmplx( zero ) )
THEN
286 sv = abs( v( lmx, i ) ) / v( lmx, i )
288 IF( u( lmx, i ).EQ.dcmplx( zero ) )
THEN
291 su = abs( u( lmx, i ) ) / u( lmx, i )
295 res1 = max( res1, abs( u( j, i )-s*v( j, i ) ) )
298 res1 = res1 / ( dble( n )*ulp )
302 CALL
zunt01(
'Columns', n, mv, v, ldv, work, lwork, rwork,
306 result = min( max( res1, res2 ), one / ulp )