147 SUBROUTINE sget51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
155 INTEGER ITYPE, LDA, LDB, LDU, LDV, N
159 REAL A( LDA, * ), B( LDB, * ), U( LDU, * ),
160 $ v( ldv, * ), work( * )
167 parameter( zero = 0.0, one = 1.0e0, ten = 10.0e0 )
170 INTEGER JCOL, JDIAG, JROW
171 REAL ANORM, ULP, UNFL, WNORM
175 EXTERNAL slamch, slange
181 INTRINSIC max, min, real
191 unfl = slamch(
'Safe minimum' )
192 ulp = slamch(
'Epsilon' )*slamch(
'Base' )
196 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
201 IF( itype.LE.2 )
THEN
205 anorm = max( slange(
'1', n, n, a, lda, work ), unfl )
207 IF( itype.EQ.1 )
THEN
211 CALL slacpy(
' ', n, n, a, lda, work, n )
212 CALL sgemm(
'N',
'N', n, n, n, one, u, ldu, b, ldb, zero,
213 $ work( n**2+1 ), n )
215 CALL sgemm(
'N',
'C', n, n, n, -one, work( n**2+1 ), n, v,
216 $ ldv, one, work, n )
222 CALL slacpy(
' ', n, n, b, ldb, work, n )
226 work( jrow+n*( jcol-1 ) ) = work( jrow+n*( jcol-1 ) )
234 wnorm = slange(
'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, real( n ) ) / ( n*ulp )
252 CALL sgemm(
'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( slange(
'1', n, n, work, n, work( n**2+1 ) ),
261 $ real( n ) ) / ( n*ulp )
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine sget51(itype, n, a, lda, b, ldb, u, ldu, v, ldv, work, result)
SGET51