120 DOUBLE PRECISION FUNCTION dqpt01( M, N, K, A, AF, LDA, TAU, JPVT,
129 INTEGER k, lda, lwork, m, n
133 DOUBLE PRECISION a( lda, * ), af( lda, * ), tau( * ),
140 DOUBLE PRECISION zero, one
141 parameter( zero = 0.0d0, one = 1.0d0 )
145 DOUBLE PRECISION norma
148 DOUBLE PRECISION rwork( 1 )
158 INTRINSIC dble, max, min
166 IF( lwork.LT.m*n+n )
THEN
167 CALL
xerbla(
'DQPT01', 10 )
173 IF( m.LE.0 .OR. n.LE.0 )
176 norma =
dlange(
'One-norm', m, n, a, lda, rwork )
179 DO 10 i = 1, min( j, m )
180 work( ( j-1 )*m+i ) = af( i, j )
183 work( ( j-1 )*m+i ) = zero
187 CALL
dcopy( m, af( 1, j ), 1, work( ( j-1 )*m+1 ), 1 )
190 CALL
dormqr(
'Left',
'No transpose', m, n, k, af, lda, tau, work,
191 $ m, work( m*n+1 ), lwork-m*n, info )
197 CALL
daxpy( m, -one, a( 1, jpvt( j ) ), 1, work( ( j-1 )*m+1 ),
202 $ ( dble( max( m, n ) )*
dlamch(
'Epsilon' ) )