124 SUBROUTINE slqt01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
132 INTEGER LDA, LWORK, M, N
135 REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
136 $ q( lda, * ), result( * ), rwork( * ), tau( * ),
144 parameter( zero = 0.0e+0, one = 1.0e+0 )
146 parameter( rogue = -1.0e+10 )
150 REAL ANORM, EPS, RESID
153 REAL SLAMCH, SLANGE, SLANSY
154 EXTERNAL slamch, slange, slansy
160 INTRINSIC max, min, real
166 COMMON / srnamc / srnamt
171 eps = slamch(
'Epsilon' )
175 CALL slacpy(
'Full', m, n, a, lda, af, lda )
180 CALL sgelqf( m, n, af, lda, tau, work, lwork, info )
184 CALL slaset(
'Full', n, n, rogue, rogue, q, lda )
186 $
CALL slacpy(
'Upper', m, n-1, af( 1, 2 ), lda, q( 1, 2 ), lda )
191 CALL sorglq( n, n, minmn, q, lda, tau, work, lwork, info )
195 CALL slaset(
'Full', m, n, zero, zero, l, lda )
196 CALL slacpy(
'Lower', m, n, af, lda, l, lda )
200 CALL sgemm(
'No transpose',
'Transpose', m, n, n, -one, a, lda, q,
205 anorm = slange(
'1', m, n, a, lda, rwork )
206 resid = slange(
'1', m, n, l, lda, rwork )
207 IF( anorm.GT.zero )
THEN
208 result( 1 ) = ( ( resid / real( max( 1, n ) ) ) / anorm ) / eps
215 CALL slaset(
'Full', n, n, zero, one, l, lda )
216 CALL ssyrk(
'Upper',
'No transpose', n, n, -one, q, lda, one, l,
221 resid = slansy(
'1',
'Upper', n, l, lda, rwork )
223 result( 2 ) = ( resid / real( max( 1, n ) ) ) / eps
subroutine sgelqf(m, n, a, lda, tau, work, lwork, info)
SGELQF
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
SSYRK
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine sorglq(m, n, k, a, lda, tau, work, lwork, info)
SORGLQ
subroutine slqt01(m, n, a, af, q, l, lda, tau, work, lwork, rwork, result)
SLQT01