LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

## ◆ csyt03()

 subroutine csyt03 ( character UPLO, integer N, complex, dimension( lda, * ) A, integer LDA, complex, dimension( ldainv, * ) AINV, integer LDAINV, complex, dimension( ldwork, * ) WORK, integer LDWORK, real, dimension( * ) RWORK, real RCOND, real RESID )

CSYT03

Purpose:
``` CSYT03 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 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 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 array, dimension (LDWORK,N)` [in] LDWORK ``` LDWORK is INTEGER The leading dimension of the array WORK. LDWORK >= max(1,N).``` [out] RWORK ` RWORK is REAL array, dimension (N)` [out] RCOND ``` RCOND is REAL The reciprocal of the condition number of A, computed as RCOND = 1/ (norm(A) * norm(AINV)).``` [out] RESID ``` RESID is REAL norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )```
Date
December 2016

Definition at line 128 of file csyt03.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  REAL rcond, resid
138 * ..
139 * .. Array Arguments ..
140  REAL rwork( * )
141  COMPLEX a( lda, * ), ainv( ldainv, * ),
142  \$ work( ldwork, * )
143 * ..
144 *
145 * =====================================================================
146 *
147 *
148 * .. Parameters ..
149  REAL zero, one
150  parameter( zero = 0.0e+0, one = 1.0e+0 )
151  COMPLEX czero, cone
152  parameter( czero = ( 0.0e+0, 0.0e+0 ),
153  \$ cone = ( 1.0e+0, 0.0e+0 ) )
154 * ..
155 * .. Local Scalars ..
156  INTEGER i, j
157  REAL ainvnm, anorm, eps
158 * ..
159 * .. External Functions ..
160  LOGICAL lsame
161  REAL clange, clansy, slamch
162  EXTERNAL lsame, clange, clansy, slamch
163 * ..
164 * .. External Subroutines ..
165  EXTERNAL csymm
166 * ..
167 * .. Intrinsic Functions ..
168  INTRINSIC real
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 = slamch( 'Epsilon' )
183  anorm = clansy( '1', uplo, n, a, lda, rwork )
184  ainvnm = clansy( '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 CSYMM 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 csymm( '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 = clange( '1', n, n, work, ldwork, rwork )
220 *
221  resid = ( ( resid*rcond )/eps ) / REAL( n )
222 *
223  RETURN
224 *
225 * End of CSYT03
226 *
subroutine csymm(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CSYMM
Definition: csymm.f:191
real function clange(NORM, M, N, A, LDA, WORK)
CLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: clange.f:117
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:69
real function clansy(NORM, UPLO, N, A, LDA, WORK)
CLANSY 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: clansy.f:125
Here is the call graph for this function:
Here is the caller graph for this function: