127 SUBROUTINE sstt21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK,
136 INTEGER KBAND, LDU, N
139 REAL AD( * ), AE( * ), RESULT( 2 ), SD( * ),
140 $ se( * ), u( ldu, * ), work( * )
147 parameter ( zero = 0.0e0, one = 1.0e0 )
151 REAL ANORM, TEMP1, TEMP2, ULP, UNFL, WNORM
154 REAL SLAMCH, SLANGE, SLANSY
155 EXTERNAL slamch, slange, slansy
161 INTRINSIC abs, max, min, real
172 unfl = slamch(
'Safe minimum' )
173 ulp = slamch(
'Precision' )
179 CALL slaset(
'Full', n, n, zero, zero, work, n )
185 work( ( n+1 )*( j-1 )+1 ) = ad( j )
186 work( ( n+1 )*( j-1 )+2 ) = ae( j )
187 temp2 = abs( ae( j ) )
188 anorm = max( anorm, abs( ad( j ) )+temp1+temp2 )
192 work( n**2 ) = ad( n )
193 anorm = max( anorm, abs( ad( n ) )+temp1, unfl )
198 CALL ssyr(
'L', n, -sd( j ), u( 1, j ), 1, work, n )
201 IF( n.GT.1 .AND. kband.EQ.1 )
THEN
203 CALL ssyr2(
'L', n, -se( j ), u( 1, j ), 1, u( 1, j+1 ), 1,
208 wnorm = slansy(
'1',
'L', n, work, n, work( n**2+1 ) )
210 IF( anorm.GT.wnorm )
THEN
211 result( 1 ) = ( wnorm / anorm ) / ( n*ulp )
213 IF( anorm.LT.one )
THEN
214 result( 1 ) = ( min( wnorm, n*anorm ) / anorm ) / ( n*ulp )
216 result( 1 ) = min( wnorm / anorm,
REAL( N ) ) / ( N*ULP )
224 CALL sgemm(
'N',
'C', n, n, n, one, u, ldu, u, ldu, zero, work,
228 work( ( n+1 )*( j-1 )+1 ) = work( ( n+1 )*( j-1 )+1 ) - one
231 result( 2 ) = min(
REAL( N ), SLANGE(
'1', n, n, work, n,
232 $ work( n**2+1 ) ) ) / ( n*ulp )
subroutine ssyr2(UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA)
SSYR2
subroutine sgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
SGEMM
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 ssyr(UPLO, N, ALPHA, X, INCX, A, LDA)
SSYR
subroutine sstt21(N, KBAND, AD, AE, SD, SE, U, LDU, WORK, RESULT)
SSTT21