153 SUBROUTINE cget51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
161 INTEGER ITYPE, LDA, LDB, LDU, LDV, N
166 COMPLEX A( LDA, * ), B( LDB, * ), U( LDU, * ),
167 $ v( ldv, * ), work( * )
174 parameter( zero = 0.0e+0, one = 1.0e+0, ten = 10.0e+0 )
176 parameter( czero = ( 0.0e+0, 0.0e+0 ),
177 $ cone = ( 1.0e+0, 0.0e+0 ) )
180 INTEGER JCOL, JDIAG, JROW
181 REAL ANORM, ULP, UNFL, WNORM
185 EXTERNAL clange, slamch
191 INTRINSIC max, min, real
201 unfl = slamch(
'Safe minimum' )
202 ulp = slamch(
'Epsilon' )*slamch(
'Base' )
206 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
211 IF( itype.LE.2 )
THEN
215 anorm = max( clange(
'1', n, n, a, lda, rwork ), unfl )
217 IF( itype.EQ.1 )
THEN
221 CALL clacpy(
' ', n, n, a, lda, work, n )
222 CALL cgemm(
'N',
'N', n, n, n, cone, u, ldu, b, ldb, czero,
223 $ work( n**2+1 ), n )
225 CALL cgemm(
'N',
'C', n, n, n, -cone, work( n**2+1 ), n, v,
226 $ ldv, cone, work, n )
232 CALL clacpy(
' ', n, n, b, ldb, work, n )
236 work( jrow+n*( jcol-1 ) ) = work( jrow+n*( jcol-1 ) )
244 wnorm = clange(
'1', n, n, work, n, rwork )
246 IF( anorm.GT.wnorm )
THEN
247 result = ( wnorm / anorm ) / ( n*ulp )
249 IF( anorm.LT.one )
THEN
250 result = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
252 result = min( wnorm / anorm, real( n ) ) / ( n*ulp )
262 CALL cgemm(
'N',
'C', n, n, n, cone, u, ldu, u, ldu, czero,
266 work( ( n+1 )*( jdiag-1 )+1 ) = work( ( n+1 )*( jdiag-1 )+
270 result = min( clange(
'1', n, n, work, n, rwork ),
271 $ real( n ) ) / ( n*ulp )
subroutine cget51(itype, n, a, lda, b, ldb, u, ldu, v, ldv, work, rwork, result)
CGET51
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.