 LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

## ◆ zsyt03()

 subroutine zsyt03 ( character UPLO, integer N, complex*16, dimension( lda, * ) A, integer LDA, complex*16, dimension( ldainv, * ) AINV, integer LDAINV, complex*16, dimension( ldwork, * ) WORK, integer LDWORK, double precision, dimension( * ) RWORK, double precision RCOND, double precision RESID )

ZSYT03

Purpose:
``` ZSYT03 computes the residual for a complex symmetric matrix times
its inverse:
norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS )
where EPS is the machine epsilon.```
Parameters
 [in] UPLO ``` UPLO is CHARACTER*1 Specifies whether the upper or lower triangular part of the complex symmetric matrix A is stored: = 'U': Upper triangular = 'L': Lower triangular``` [in] N ``` N is INTEGER The number of rows and columns of the matrix A. N >= 0.``` [in] A ``` A is COMPLEX*16 array, dimension (LDA,N) The original complex symmetric matrix A.``` [in] LDA ``` LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N)``` [in,out] AINV ``` AINV is COMPLEX*16 array, dimension (LDAINV,N) On entry, the inverse of the matrix A, stored as a symmetric matrix in the same format as A. In this version, AINV is expanded into a full matrix and multiplied by A, so the opposing triangle of AINV will be changed; i.e., if the upper triangular part of AINV is stored, the lower triangular part will be used as work space.``` [in] LDAINV ``` LDAINV is INTEGER The leading dimension of the array AINV. LDAINV >= max(1,N).``` [out] WORK ` WORK is COMPLEX*16 array, dimension (LDWORK,N)` [in] LDWORK ``` LDWORK is INTEGER The leading dimension of the array WORK. LDWORK >= max(1,N).``` [out] RWORK ` RWORK is DOUBLE PRECISION array, dimension (N)` [out] RCOND ``` RCOND is DOUBLE PRECISION The reciprocal of the condition number of A, computed as RCOND = 1/ (norm(A) * norm(AINV)).``` [out] RESID ``` RESID is DOUBLE PRECISION norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )```
Date
December 2016

Definition at line 128 of file zsyt03.f.

128 *
129 * -- LAPACK test routine (version 3.7.0) --
130 * -- LAPACK is a software package provided by Univ. of Tennessee, --
131 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
132 * December 2016
133 *
134 * .. Scalar Arguments ..
135  CHARACTER uplo
136  INTEGER lda, ldainv, ldwork, n
137  DOUBLE PRECISION rcond, resid
138 * ..
139 * .. Array Arguments ..
140  DOUBLE PRECISION rwork( * )
141  COMPLEX*16 a( lda, * ), ainv( ldainv, * ),
142  \$ work( ldwork, * )
143 * ..
144 *
145 * =====================================================================
146 *
147 *
148 * .. Parameters ..
149  DOUBLE PRECISION zero, one
150  parameter( zero = 0.0d+0, one = 1.0d+0 )
151  COMPLEX*16 czero, cone
152  parameter( czero = ( 0.0d+0, 0.0d+0 ),
153  \$ cone = ( 1.0d+0, 0.0d+0 ) )
154 * ..
155 * .. Local Scalars ..
156  INTEGER i, j
157  DOUBLE PRECISION ainvnm, anorm, eps
158 * ..
159 * .. External Functions ..
160  LOGICAL lsame
161  DOUBLE PRECISION dlamch, zlange, zlansy
162  EXTERNAL lsame, dlamch, zlange, zlansy
163 * ..
164 * .. External Subroutines ..
165  EXTERNAL zsymm
166 * ..
167 * .. Intrinsic Functions ..
168  INTRINSIC dble
169 * ..
170 * .. Executable Statements ..
171 *
172 * Quick exit if N = 0
173 *
174  IF( n.LE.0 ) THEN
175  rcond = one
176  resid = zero
177  RETURN
178  END IF
179 *
180 * Exit with RESID = 1/EPS if ANORM = 0 or AINVNM = 0.
181 *
182  eps = dlamch( 'Epsilon' )
183  anorm = zlansy( '1', uplo, n, a, lda, rwork )
184  ainvnm = zlansy( '1', uplo, n, ainv, ldainv, rwork )
185  IF( anorm.LE.zero .OR. ainvnm.LE.zero ) THEN
186  rcond = zero
187  resid = one / eps
188  RETURN
189  END IF
190  rcond = ( one / anorm ) / ainvnm
191 *
192 * Expand AINV into a full matrix and call ZSYMM to multiply
193 * AINV on the left by A (store the result in WORK).
194 *
195  IF( lsame( uplo, 'U' ) ) THEN
196  DO 20 j = 1, n
197  DO 10 i = 1, j - 1
198  ainv( j, i ) = ainv( i, j )
199  10 CONTINUE
200  20 CONTINUE
201  ELSE
202  DO 40 j = 1, n
203  DO 30 i = j + 1, n
204  ainv( j, i ) = ainv( i, j )
205  30 CONTINUE
206  40 CONTINUE
207  END IF
208  CALL zsymm( 'Left', uplo, n, n, -cone, a, lda, ainv, ldainv,
209  \$ czero, work, ldwork )
210 *
211 * Add the identity matrix to WORK .
212 *
213  DO 50 i = 1, n
214  work( i, i ) = work( i, i ) + cone
215  50 CONTINUE
216 *
217 * Compute norm(I - A*AINV) / (N * norm(A) * norm(AINV) * EPS)
218 *
219  resid = zlange( '1', n, n, work, ldwork, rwork )
220 *
221  resid = ( ( resid*rcond ) / eps ) / dble( n )
222 *
223  RETURN
224 *
225 * End of ZSYT03
226 *
subroutine zsymm(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
ZSYMM
Definition: zsymm.f:191
double precision function zlange(NORM, M, N, A, LDA, WORK)
ZLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: zlange.f:117
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
double precision function zlansy(NORM, UPLO, N, A, LDA, WORK)
ZLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex symmetric matrix.
Definition: zlansy.f:125
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
Here is the call graph for this function:
Here is the caller graph for this function: