124 SUBROUTINE dlqt01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
132 INTEGER LDA, LWORK, M, N
135 DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
136 $ q( 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 dgelqf( m, n, af, lda, tau, work, lwork, info )
184 CALL dlaset(
'Full', n, n, rogue, rogue, q, lda )
186 $
CALL dlacpy(
'Upper', m, n-1, af( 1, 2 ), lda, q( 1, 2 ), lda )
191 CALL dorglq( n, n, minmn, q, lda, tau, work, lwork, info )
195 CALL dlaset(
'Full', m, n, zero, zero, l, lda )
196 CALL dlacpy(
'Lower', m, n, af, lda, l, lda )
200 CALL dgemm(
'No transpose',
'Transpose', m, n, n, -one, a, lda, q,
205 anorm = dlange(
'1', m, n, a, lda, rwork )
206 resid = dlange(
'1', m, n, l, lda, rwork )
207 IF( anorm.GT.zero )
THEN
208 result( 1 ) = ( ( resid / dble( max( 1, n ) ) ) / anorm ) / eps
215 CALL dlaset(
'Full', n, n, zero, one, l, lda )
216 CALL dsyrk(
'Upper',
'No transpose', n, n, -one, q, lda, one, l,
221 resid = dlansy(
'1',
'Upper', n, l, lda, rwork )
223 result( 2 ) = ( resid / dble( max( 1, n ) ) ) / eps
subroutine dlqt01(m, n, a, af, q, l, lda, tau, work, lwork, rwork, result)
DLQT01
subroutine dgelqf(m, n, a, lda, tau, work, lwork, info)
DGELQF
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
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 dorglq(m, n, k, a, lda, tau, work, lwork, info)
DORGLQ