122 SUBROUTINE zsyt01_aa( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C,
123 $ LDC, RWORK, RESID )
131 INTEGER LDA, LDAFAC, LDC, N
132 DOUBLE PRECISION RESID
136 COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
137 DOUBLE PRECISION RWORK( * )
143 DOUBLE PRECISION ZERO, ONE
144 parameter( zero = 0.0d+0, one = 1.0d+0 )
145 COMPLEX*16 CZERO, CONE
146 parameter( czero = ( 0.0d+0, 0.0d+0 ),
147 $ cone = ( 1.0d+0, 0.0d+0 ) )
151 DOUBLE PRECISION ANORM, EPS
155 DOUBLE PRECISION DLAMCH, ZLANSY
156 EXTERNAL lsame, dlamch, zlansy
175 eps = dlamch(
'Epsilon' )
176 anorm = zlansy(
'1', uplo, n, a, lda, rwork )
180 CALL zlaset(
'Full', n, n, czero, czero, c, ldc )
181 CALL zlacpy(
'F', 1, n, afac( 1, 1 ), ldafac+1, c( 1, 1 ), ldc+1 )
183 IF( lsame( uplo,
'U' ) )
THEN
184 CALL zlacpy(
'F', 1, n-1, afac( 1, 2 ), ldafac+1, c( 1, 2 ),
186 CALL zlacpy(
'F', 1, n-1, afac( 1, 2 ), ldafac+1, c( 2, 1 ),
189 CALL zlacpy(
'F', 1, n-1, afac( 2, 1 ), ldafac+1, c( 1, 2 ),
191 CALL zlacpy(
'F', 1, n-1, afac( 2, 1 ), ldafac+1, c( 2, 1 ),
197 IF( lsame( uplo,
'U' ) )
THEN
198 CALL ztrmm(
'Left', uplo,
'Transpose',
'Unit', n-1, n,
199 $ cone, afac( 1, 2 ), ldafac, c( 2, 1 ), ldc )
201 CALL ztrmm(
'Left', uplo,
'No transpose',
'Unit', n-1, n,
202 $ cone, afac( 2, 1 ), ldafac, c( 2, 1 ), ldc )
207 IF( lsame( uplo,
'U' ) )
THEN
208 CALL ztrmm(
'Right', uplo,
'No transpose',
'Unit', n, n-1,
209 $ cone, afac( 1, 2 ), ldafac, c( 1, 2 ), ldc )
211 CALL ztrmm(
'Right', uplo,
'Transpose',
'Unit', n, n-1,
212 $ cone, afac( 2, 1 ), ldafac, c( 1, 2 ), ldc )
221 $
CALL zswap( n, c( j, 1 ), ldc, c( i, 1 ), ldc )
226 $
CALL zswap( n, c( 1, j ), 1, c( 1, i ), 1 )
232 IF( lsame( uplo,
'U' ) )
THEN
235 c( i, j ) = c( i, j ) - a( i, j )
241 c( i, j ) = c( i, j ) - a( i, j )
248 resid = zlansy(
'1', uplo, n, c, ldc, rwork )
250 IF( anorm.LE.zero )
THEN
254 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlaset(uplo, m, n, alpha, beta, a, lda)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP
subroutine ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRMM
subroutine zlavsy(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
ZLAVSY
subroutine zsyt01_aa(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
ZSYT01