125 SUBROUTINE sstt21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK,
133 INTEGER KBAND, LDU, N
136 REAL AD( * ), AE( * ), RESULT( 2 ), SD( * ),
137 $ se( * ), u( ldu, * ), work( * )
144 parameter( zero = 0.0e0, one = 1.0e0 )
148 REAL ANORM, TEMP1, TEMP2, ULP, UNFL, WNORM
151 REAL SLAMCH, SLANGE, SLANSY
152 EXTERNAL slamch, slange, slansy
158 INTRINSIC abs, max, min, real
169 unfl = slamch(
'Safe minimum' )
170 ulp = slamch(
'Precision' )
176 CALL slaset(
'Full', n, n, zero, zero, work, n )
182 work( ( n+1 )*( j-1 )+1 ) = ad( j )
183 work( ( n+1 )*( j-1 )+2 ) = ae( j )
184 temp2 = abs( ae( j ) )
185 anorm = max( anorm, abs( ad( j ) )+temp1+temp2 )
189 work( n**2 ) = ad( n )
190 anorm = max( anorm, abs( ad( n ) )+temp1, unfl )
195 CALL ssyr(
'L', n, -sd( j ), u( 1, j ), 1, work, n )
198 IF( n.GT.1 .AND. kband.EQ.1 )
THEN
200 CALL ssyr2(
'L', n, -se( j ), u( 1, j ), 1, u( 1, j+1 ), 1,
205 wnorm = slansy(
'1',
'L', n, work, n, work( n**2+1 ) )
207 IF( anorm.GT.wnorm )
THEN
208 result( 1 ) = ( wnorm / anorm ) / ( n*ulp )
210 IF( anorm.LT.one )
THEN
211 result( 1 ) = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
213 result( 1 ) = min( wnorm / anorm, real( n ) ) / ( n*ulp )
221 CALL sgemm(
'N',
'C', n, n, n, one, u, ldu, u, ldu, zero, work,
225 work( ( n+1 )*( j-1 )+1 ) = work( ( n+1 )*( j-1 )+1 ) - one
228 result( 2 ) = min( real( n ), slange(
'1', n, n, work, n,
229 $ work( n**2+1 ) ) ) / ( n*ulp )
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda)
SSYR2
subroutine ssyr(uplo, n, alpha, x, incx, a, lda)
SSYR
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine sstt21(n, kband, ad, ae, sd, se, u, ldu, work, result)
SSTT21