149 SUBROUTINE dget51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
158 INTEGER ITYPE, LDA, LDB, LDU, LDV, N
159 DOUBLE PRECISION RESULT
162 DOUBLE PRECISION A( lda, * ), B( ldb, * ), U( ldu, * ),
163 $ v( ldv, * ), work( * )
169 DOUBLE PRECISION ZERO, ONE, TEN
170 parameter ( zero = 0.0d0, one = 1.0d0, ten = 10.0d0 )
173 INTEGER JCOL, JDIAG, JROW
174 DOUBLE PRECISION ANORM, ULP, UNFL, WNORM
177 DOUBLE PRECISION DLAMCH, DLANGE
178 EXTERNAL dlamch, dlange
184 INTRINSIC dble, max, min
194 unfl = dlamch(
'Safe minimum' )
195 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
199 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
204 IF( itype.LE.2 )
THEN
208 anorm = max( dlange(
'1', n, n, a, lda, work ), unfl )
210 IF( itype.EQ.1 )
THEN
214 CALL dlacpy(
' ', n, n, a, lda, work, n )
215 CALL dgemm(
'N',
'N', n, n, n, one, u, ldu, b, ldb, zero,
216 $ work( n**2+1 ), n )
218 CALL dgemm(
'N',
'C', n, n, n, -one, work( n**2+1 ), n, v,
219 $ ldv, one, work, n )
225 CALL dlacpy(
' ', n, n, b, ldb, work, n )
229 work( jrow+n*( jcol-1 ) ) = work( jrow+n*( jcol-1 ) )
237 wnorm = dlange(
'1', n, n, work, n, work( n**2+1 ) )
239 IF( anorm.GT.wnorm )
THEN
240 result = ( wnorm / anorm ) / ( n*ulp )
242 IF( anorm.LT.one )
THEN
243 result = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
245 result = min( wnorm / anorm, dble( n ) ) / ( n*ulp )
255 CALL dgemm(
'N',
'C', n, n, n, one, u, ldu, u, ldu, zero, work,
259 work( ( n+1 )*( jdiag-1 )+1 ) = work( ( n+1 )*( jdiag-1 )+
263 result = min( dlange(
'1', n, n, work, n, work( n**2+1 ) ),
264 $ dble( n ) ) / ( n*ulp )
subroutine dlacpy(UPLO, M, N, A, LDA, B, LDB)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DGEMM
subroutine dget51(ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK, RESULT)
DGET51