LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine csyt02 ( character  UPLO,
integer  N,
integer  NRHS,
complex, dimension( lda, * )  A,
integer  LDA,
complex, dimension( ldx, * )  X,
integer  LDX,
complex, dimension( ldb, * )  B,
integer  LDB,
real, dimension( * )  RWORK,
real  RESID 
)

CSYT02

Purpose:
 CSYT02 computes the residual for a solution to a complex symmetric
 system of linear equations  A*x = b:

    RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),

 where EPS is the machine epsilon.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
          Specifies whether the upper or lower triangular part of the
          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]NRHS
          NRHS is INTEGER
          The number of columns of B, the matrix of right hand sides.
          NRHS >= 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]X
          X is COMPLEX array, dimension (LDX,NRHS)
          The computed solution vectors for the system of linear
          equations.
[in]LDX
          LDX is INTEGER
          The leading dimension of the array X.   LDX >= max(1,N).
[in,out]B
          B is COMPLEX array, dimension (LDB,NRHS)
          On entry, the right hand side vectors for the system of
          linear equations.
          On exit, B is overwritten with the difference B - A*X.
[in]LDB
          LDB is INTEGER
          The leading dimension of the array B.  LDB >= max(1,N).
[out]RWORK
          RWORK is REAL array, dimension (N)
[out]RESID
          RESID is REAL
          The maximum over the number of right hand sides of
          norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 129 of file csyt02.f.

129 *
130 * -- LAPACK test routine (version 3.4.0) --
131 * -- LAPACK is a software package provided by Univ. of Tennessee, --
132 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
133 * November 2011
134 *
135 * .. Scalar Arguments ..
136  CHARACTER uplo
137  INTEGER lda, ldb, ldx, n, nrhs
138  REAL resid
139 * ..
140 * .. Array Arguments ..
141  REAL rwork( * )
142  COMPLEX a( lda, * ), b( ldb, * ), x( ldx, * )
143 * ..
144 *
145 * =====================================================================
146 *
147 * .. Parameters ..
148  REAL zero, one
149  parameter ( zero = 0.0e+0, one = 1.0e+0 )
150  COMPLEX cone
151  parameter ( cone = ( 1.0e+0, 0.0e+0 ) )
152 * ..
153 * .. Local Scalars ..
154  INTEGER j
155  REAL anorm, bnorm, eps, xnorm
156 * ..
157 * .. External Functions ..
158  REAL clansy, scasum, slamch
159  EXTERNAL clansy, scasum, slamch
160 * ..
161 * .. External Subroutines ..
162  EXTERNAL csymm
163 * ..
164 * .. Intrinsic Functions ..
165  INTRINSIC max
166 * ..
167 * .. Executable Statements ..
168 *
169 * Quick exit if N = 0 or NRHS = 0
170 *
171  IF( n.LE.0 .OR. nrhs.LE.0 ) THEN
172  resid = zero
173  RETURN
174  END IF
175 *
176 * Exit with RESID = 1/EPS if ANORM = 0.
177 *
178  eps = slamch( 'Epsilon' )
179  anorm = clansy( '1', uplo, n, a, lda, rwork )
180  IF( anorm.LE.zero ) THEN
181  resid = one / eps
182  RETURN
183  END IF
184 *
185 * Compute B - A*X (or B - A'*X ) and store in B .
186 *
187  CALL csymm( 'Left', uplo, n, nrhs, -cone, a, lda, x, ldx, cone, b,
188  $ ldb )
189 *
190 * Compute the maximum over the number of right hand sides of
191 * norm( B - A*X ) / ( norm(A) * norm(X) * EPS ) .
192 *
193  resid = zero
194  DO 10 j = 1, nrhs
195  bnorm = scasum( n, b( 1, j ), 1 )
196  xnorm = scasum( n, x( 1, j ), 1 )
197  IF( xnorm.LE.zero ) THEN
198  resid = one / eps
199  ELSE
200  resid = max( resid, ( ( bnorm/anorm )/xnorm )/eps )
201  END IF
202  10 CONTINUE
203 *
204  RETURN
205 *
206 * End of CSYT02
207 *
real function scasum(N, CX, INCX)
SCASUM
Definition: scasum.f:54
subroutine csymm(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CSYMM
Definition: csymm.f:191
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
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:69

Here is the call graph for this function:

Here is the caller graph for this function: