154 SUBROUTINE cget51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
163 INTEGER ITYPE, LDA, LDB, LDU, LDV, N
168 COMPLEX A( lda, * ), B( ldb, * ), U( ldu, * ),
169 $ v( ldv, * ), work( * )
176 parameter ( zero = 0.0e+0, one = 1.0e+0, ten = 10.0e+0 )
178 parameter ( czero = ( 0.0e+0, 0.0e+0 ),
179 $ cone = ( 1.0e+0, 0.0e+0 ) )
182 INTEGER JCOL, JDIAG, JROW
183 REAL ANORM, ULP, UNFL, WNORM
187 EXTERNAL clange, slamch
193 INTRINSIC max, min, real
203 unfl = slamch(
'Safe minimum' )
204 ulp = slamch(
'Epsilon' )*slamch(
'Base' )
208 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
213 IF( itype.LE.2 )
THEN
217 anorm = max( clange(
'1', n, n, a, lda, rwork ), unfl )
219 IF( itype.EQ.1 )
THEN
223 CALL clacpy(
' ', n, n, a, lda, work, n )
224 CALL cgemm(
'N',
'N', n, n, n, cone, u, ldu, b, ldb, czero,
225 $ work( n**2+1 ), n )
227 CALL cgemm(
'N',
'C', n, n, n, -cone, work( n**2+1 ), n, v,
228 $ ldv, cone, work, n )
234 CALL clacpy(
' ', n, n, b, ldb, work, n )
238 work( jrow+n*( jcol-1 ) ) = work( jrow+n*( jcol-1 ) )
246 wnorm = clange(
'1', n, n, work, n, rwork )
248 IF( anorm.GT.wnorm )
THEN
249 result = ( wnorm / anorm ) / ( n*ulp )
251 IF( anorm.LT.one )
THEN
252 result = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
254 result = min( wnorm / anorm,
REAL( N ) ) / ( N*ULP )
264 CALL cgemm(
'N',
'C', n, n, n, cone, u, ldu, u, ldu, czero,
268 work( ( n+1 )*( jdiag-1 )+1 ) = work( ( n+1 )*( jdiag-1 )+
272 result = min( clange(
'1', n, n, work, n, rwork ),
273 $
REAL( N ) ) / ( N*ULP )
subroutine cget51(ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK, RWORK, RESULT)
CGET51
subroutine clacpy(UPLO, M, N, A, LDA, B, LDB)
CLACPY copies all or part of one two-dimensional array to another.
subroutine cgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CGEMM