117 SUBROUTINE sort01( ROWCOL, M, N, U, LDU, WORK, LWORK, RESID )
126 INTEGER ldu, lwork, m, n
130 REAL u( ldu, * ), work( * )
137 parameter( zero = 0.0e+0, one = 1.0e+0 )
141 INTEGER i, j, k, ldwork, mnmin
153 INTRINSIC max, min, real
161 IF( m.LE.0 .OR. n.LE.0 )
164 eps =
slamch(
'Precision' )
165 IF( m.LT.n .OR. ( m.EQ.n .AND.
lsame( rowcol,
'R' ) ) )
THEN
174 IF( ( mnmin+1 )*mnmin.LE.lwork )
THEN
179 IF( ldwork.GT.0 )
THEN
183 CALL
slaset(
'Upper', mnmin, mnmin, zero, one, work, ldwork )
184 CALL
ssyrk(
'Upper', transu, mnmin, k, -one, u, ldu, one, work,
189 resid =
slansy(
'1',
'Upper', mnmin, work, ldwork,
190 $ work( ldwork*mnmin+1 ) )
191 resid = ( resid /
REAL( K ) ) / eps
192 ELSE IF( transu.EQ.
'T' )
THEN
203 tmp = tmp -
sdot( m, u( 1, i ), 1, u( 1, j ), 1 )
204 resid = max( resid, abs( tmp ) )
207 resid = ( resid /
REAL( M ) ) / eps
219 tmp = tmp -
sdot( n, u( j, 1 ), ldu, u( i, 1 ), ldu )
220 resid = max( resid, abs( tmp ) )
223 resid = ( resid /
REAL( N ) ) / eps