154 SUBROUTINE cget54( 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
166 COMPLEX A( LDA, * ), B( LDB, * ), S( LDS, * ),
167 $ t( ldt, * ), u( ldu, * ), v( ldv, * ),
175 parameter( zero = 0.0e+0, one = 1.0e+0 )
177 parameter( czero = ( 0.0e+0, 0.0e+0 ),
178 $ cone = ( 1.0e+0, 0.0e+0 ) )
181 REAL ABNORM, ULP, UNFL, WNORM
188 EXTERNAL clange, slamch
194 INTRINSIC max, min, real
204 unfl = slamch(
'Safe minimum' )
205 ulp = slamch(
'Epsilon' )*slamch(
'Base' )
209 CALL clacpy(
'Full', n, n, a, lda, work, n )
210 CALL clacpy(
'Full', n, n, b, ldb, work( n*n+1 ), n )
211 abnorm = max( clange(
'1', n, 2*n, work, n, dum ), unfl )
215 CALL clacpy(
' ', n, n, a, lda, work, n )
216 CALL cgemm(
'N',
'N', n, n, n, cone, u, ldu, s, lds, czero,
219 CALL cgemm(
'N',
'C', n, n, n, -cone, work( n*n+1 ), n, v, ldv,
224 CALL clacpy(
' ', n, n, b, ldb, work( n*n+1 ), n )
225 CALL cgemm(
'N',
'N', n, n, n, cone, u, ldu, t, ldt, czero,
226 $ work( 2*n*n+1 ), n )
228 CALL cgemm(
'N',
'C', n, n, n, -cone, work( 2*n*n+1 ), n, v, ldv,
229 $ cone, work( n*n+1 ), n )
233 wnorm = clange(
'1', n, 2*n, work, n, dum )
235 IF( abnorm.GT.wnorm )
THEN
236 result = ( wnorm / abnorm ) / ( 2*n*ulp )
238 IF( abnorm.LT.one )
THEN
239 result = ( min( wnorm, 2*n*abnorm ) / abnorm ) / ( 2*n*ulp )
241 result = min( wnorm / abnorm, real( 2*n ) ) / ( 2*n*ulp )
subroutine cget54(n, a, lda, b, ldb, s, lds, t, ldt, u, ldu, v, ldv, work, result)
CGET54
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.