154 SUBROUTINE dget54( N, A, LDA, B, LDB, S, LDS, T, LDT, U, LDU, V,
155 $ LDV, WORK, RESULT )
162 INTEGER LDA, LDB, LDS, LDT, LDU, LDV, N
163 DOUBLE PRECISION RESULT
166 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( LDS, * ),
167 $ t( ldt, * ), u( ldu, * ), v( ldv, * ),
174 DOUBLE PRECISION ZERO, ONE
175 parameter( zero = 0.0d+0, one = 1.0d+0 )
178 DOUBLE PRECISION ABNORM, ULP, UNFL, WNORM
181 DOUBLE PRECISION DUM( 1 )
184 DOUBLE PRECISION DLAMCH, DLANGE
185 EXTERNAL dlamch, dlange
191 INTRINSIC dble, max, min
201 unfl = dlamch(
'Safe minimum' )
202 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
206 CALL dlacpy(
'Full', n, n, a, lda, work, n )
207 CALL dlacpy(
'Full', n, n, b, ldb, work( n*n+1 ), n )
208 abnorm = max( dlange(
'1', n, 2*n, work, n, dum ), unfl )
212 CALL dlacpy(
' ', n, n, a, lda, work, n )
213 CALL dgemm(
'N',
'N', n, n, n, one, u, ldu, s, lds, zero,
216 CALL dgemm(
'N',
'C', n, n, n, -one, work( n*n+1 ), n, v, ldv,
221 CALL dlacpy(
' ', n, n, b, ldb, work( n*n+1 ), n )
222 CALL dgemm(
'N',
'N', n, n, n, one, u, ldu, t, ldt, zero,
223 $ work( 2*n*n+1 ), n )
225 CALL dgemm(
'N',
'C', n, n, n, -one, work( 2*n*n+1 ), n, v, ldv,
226 $ one, work( n*n+1 ), n )
230 wnorm = dlange(
'1', n, 2*n, work, n, dum )
232 IF( abnorm.GT.wnorm )
THEN
233 result = ( wnorm / abnorm ) / ( 2*n*ulp )
235 IF( abnorm.LT.one )
THEN
236 result = ( min( wnorm, 2*n*abnorm ) / abnorm ) / ( 2*n*ulp )
238 result = min( wnorm / abnorm, dble( 2*n ) ) / ( 2*n*ulp )
subroutine dget54(n, a, lda, b, ldb, s, lds, t, ldt, u, ldu, v, ldv, work, result)
DGET54
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.