124 SUBROUTINE dqrt01p( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
132 INTEGER LDA, LWORK, M, N
135 DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
136 $ r( lda, * ), result( * ), rwork( * ), tau( * ),
143 DOUBLE PRECISION ZERO, ONE
144 parameter( zero = 0.0d+0, one = 1.0d+0 )
145 DOUBLE PRECISION ROGUE
146 parameter( rogue = -1.0d+10 )
150 DOUBLE PRECISION ANORM, EPS, RESID
153 DOUBLE PRECISION DLAMCH, DLANGE, DLANSY
154 EXTERNAL dlamch, dlange, dlansy
160 INTRINSIC dble, max, min
166 COMMON / srnamc / srnamt
171 eps = dlamch(
'Epsilon' )
175 CALL dlacpy(
'Full', m, n, a, lda, af, lda )
180 CALL dgeqrfp( m, n, af, lda, tau, work, lwork, info )
184 CALL dlaset(
'Full', m, m, rogue, rogue, q, lda )
185 CALL dlacpy(
'Lower', m-1, n, af( 2, 1 ), lda, q( 2, 1 ), lda )
190 CALL dorgqr( m, m, minmn, q, lda, tau, work, lwork, info )
194 CALL dlaset(
'Full', m, n, zero, zero, r, lda )
195 CALL dlacpy(
'Upper', m, n, af, lda, r, lda )
199 CALL dgemm(
'Transpose',
'No transpose', m, n, m, -one, q, lda, a,
204 anorm = dlange(
'1', m, n, a, lda, rwork )
205 resid = dlange(
'1', m, n, r, lda, rwork )
206 IF( anorm.GT.zero )
THEN
207 result( 1 ) = ( ( resid / dble( max( 1, m ) ) ) / anorm ) / eps
214 CALL dlaset(
'Full', m, m, zero, one, r, lda )
215 CALL dsyrk(
'Upper',
'Transpose', m, m, -one, q, lda, one, r,
220 resid = dlansy(
'1',
'Upper', m, r, lda, rwork )
222 result( 2 ) = ( resid / dble( max( 1, m ) ) ) / eps
subroutine dqrt01p(m, n, a, af, q, r, lda, tau, work, lwork, rwork, result)
DQRT01P
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dgeqrfp(m, n, a, lda, tau, work, lwork, info)
DGEQRFP
subroutine dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
DSYRK
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine dorgqr(m, n, k, a, lda, tau, work, lwork, info)
DORGQR