147 SUBROUTINE dget51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
155 INTEGER ITYPE, LDA, LDB, LDU, LDV, N
156 DOUBLE PRECISION RESULT
159 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), U( LDU, * ),
160 $ v( ldv, * ), work( * )
166 DOUBLE PRECISION ZERO, ONE, TEN
167 parameter( zero = 0.0d0, one = 1.0d0, ten = 10.0d0 )
170 INTEGER JCOL, JDIAG, JROW
171 DOUBLE PRECISION ANORM, ULP, UNFL, WNORM
174 DOUBLE PRECISION DLAMCH, DLANGE
175 EXTERNAL dlamch, dlange
181 INTRINSIC dble, max, min
191 unfl = dlamch(
'Safe minimum' )
192 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
196 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
201 IF( itype.LE.2 )
THEN
205 anorm = max( dlange(
'1', n, n, a, lda, work ), unfl )
207 IF( itype.EQ.1 )
THEN
211 CALL dlacpy(
' ', n, n, a, lda, work, n )
212 CALL dgemm(
'N',
'N', n, n, n, one, u, ldu, b, ldb, zero,
213 $ work( n**2+1 ), n )
215 CALL dgemm(
'N',
'C', n, n, n, -one, work( n**2+1 ), n, v,
216 $ ldv, one, work, n )
222 CALL dlacpy(
' ', n, n, b, ldb, work, n )
226 work( jrow+n*( jcol-1 ) ) = work( jrow+n*( jcol-1 ) )
234 wnorm = dlange(
'1', n, n, work, n, work( n**2+1 ) )
236 IF( anorm.GT.wnorm )
THEN
237 result = ( wnorm / anorm ) / ( n*ulp )
239 IF( anorm.LT.one )
THEN
240 result = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
242 result = min( wnorm / anorm, dble( n ) ) / ( n*ulp )
252 CALL dgemm(
'N',
'C', n, n, n, one, u, ldu, u, ldu, zero, work,
256 work( ( n+1 )*( jdiag-1 )+1 ) = work( ( n+1 )*( jdiag-1 )+
260 result = min( dlange(
'1', n, n, work, n, work( n**2+1 ) ),
261 $ dble( n ) ) / ( n*ulp )
subroutine dget51(itype, n, a, lda, b, ldb, u, ldu, v, ldv, work, result)
DGET51
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.