 LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

◆ dsgt01()

 subroutine dsgt01 ( integer ITYPE, character UPLO, integer N, integer M, double precision, dimension( lda, * ) A, integer LDA, double precision, dimension( ldb, * ) B, integer LDB, double precision, dimension( ldz, * ) Z, integer LDZ, double precision, dimension( * ) D, double precision, dimension( * ) WORK, double precision, dimension( * ) RESULT )

DSGT01

Purpose:
``` DDGT01 checks a decomposition of the form

A Z   =  B Z D or
A B Z =  Z D or
B A Z =  Z D

where A is a symmetric matrix, B is
symmetric positive definite, Z is orthogonal, and D is diagonal.

One of the following test ratios is computed:

ITYPE = 1:  RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp )

ITYPE = 2:  RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp )

ITYPE = 3:  RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp )```
Parameters
 [in] ITYPE ``` ITYPE is INTEGER The form of the symmetric generalized eigenproblem. = 1: A*z = (lambda)*B*z = 2: A*B*z = (lambda)*z = 3: B*A*z = (lambda)*z``` [in] UPLO ``` UPLO is CHARACTER*1 Specifies whether the upper or lower triangular part of the symmetric matrices A and B is stored. = 'U': Upper triangular = 'L': Lower triangular``` [in] N ``` N is INTEGER The order of the matrix A. N >= 0.``` [in] M ``` M is INTEGER The number of eigenvalues found. 0 <= M <= N.``` [in] A ``` A is DOUBLE PRECISION array, dimension (LDA, N) The original symmetric matrix A.``` [in] LDA ``` LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N).``` [in] B ``` B is DOUBLE PRECISION array, dimension (LDB, N) The original symmetric positive definite matrix B.``` [in] LDB ``` LDB is INTEGER The leading dimension of the array B. LDB >= max(1,N).``` [in] Z ``` Z is DOUBLE PRECISION array, dimension (LDZ, M) The computed eigenvectors of the generalized eigenproblem.``` [in] LDZ ``` LDZ is INTEGER The leading dimension of the array Z. LDZ >= max(1,N).``` [in] D ``` D is DOUBLE PRECISION array, dimension (M) The computed eigenvalues of the generalized eigenproblem.``` [out] WORK ` WORK is DOUBLE PRECISION array, dimension (N*N)` [out] RESULT ``` RESULT is DOUBLE PRECISION array, dimension (1) The test ratio as described above.```
Date
December 2016

Definition at line 148 of file dsgt01.f.

148 *
149 * -- LAPACK test routine (version 3.7.0) --
150 * -- LAPACK is a software package provided by Univ. of Tennessee, --
151 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
152 * December 2016
153 *
154 * .. Scalar Arguments ..
155  CHARACTER uplo
156  INTEGER itype, lda, ldb, ldz, m, n
157 * ..
158 * .. Array Arguments ..
159  DOUBLE PRECISION a( lda, * ), b( ldb, * ), d( * ), result( * ),
160  \$ work( * ), z( ldz, * )
161 * ..
162 *
163 * =====================================================================
164 *
165 * .. Parameters ..
166  DOUBLE PRECISION zero, one
167  parameter( zero = 0.0d0, one = 1.0d0 )
168 * ..
169 * .. Local Scalars ..
170  INTEGER i
171  DOUBLE PRECISION anorm, ulp
172 * ..
173 * .. External Functions ..
174  DOUBLE PRECISION dlamch, dlange, dlansy
175  EXTERNAL dlamch, dlange, dlansy
176 * ..
177 * .. External Subroutines ..
178  EXTERNAL dscal, dsymm
179 * ..
180 * .. Executable Statements ..
181 *
182  result( 1 ) = zero
183  IF( n.LE.0 )
184  \$ RETURN
185 *
186  ulp = dlamch( 'Epsilon' )
187 *
188 * Compute product of 1-norms of A and Z.
189 *
190  anorm = dlansy( '1', uplo, n, a, lda, work )*
191  \$ dlange( '1', n, m, z, ldz, work )
192  IF( anorm.EQ.zero )
193  \$ anorm = one
194 *
195  IF( itype.EQ.1 ) THEN
196 *
197 * Norm of AZ - BZD
198 *
199  CALL dsymm( 'Left', uplo, n, m, one, a, lda, z, ldz, zero,
200  \$ work, n )
201  DO 10 i = 1, m
202  CALL dscal( n, d( i ), z( 1, i ), 1 )
203  10 CONTINUE
204  CALL dsymm( 'Left', uplo, n, m, one, b, ldb, z, ldz, -one,
205  \$ work, n )
206 *
207  result( 1 ) = ( dlange( '1', n, m, work, n, work ) / anorm ) /
208  \$ ( n*ulp )
209 *
210  ELSE IF( itype.EQ.2 ) THEN
211 *
212 * Norm of ABZ - ZD
213 *
214  CALL dsymm( 'Left', uplo, n, m, one, b, ldb, z, ldz, zero,
215  \$ work, n )
216  DO 20 i = 1, m
217  CALL dscal( n, d( i ), z( 1, i ), 1 )
218  20 CONTINUE
219  CALL dsymm( 'Left', uplo, n, m, one, a, lda, work, n, -one, z,
220  \$ ldz )
221 *
222  result( 1 ) = ( dlange( '1', n, m, z, ldz, work ) / anorm ) /
223  \$ ( n*ulp )
224 *
225  ELSE IF( itype.EQ.3 ) THEN
226 *
227 * Norm of BAZ - ZD
228 *
229  CALL dsymm( 'Left', uplo, n, m, one, a, lda, z, ldz, zero,
230  \$ work, n )
231  DO 30 i = 1, m
232  CALL dscal( n, d( i ), z( 1, i ), 1 )
233  30 CONTINUE
234  CALL dsymm( 'Left', uplo, n, m, one, b, ldb, work, n, -one, z,
235  \$ ldz )
236 *
237  result( 1 ) = ( dlange( '1', n, m, z, ldz, work ) / anorm ) /
238  \$ ( n*ulp )
239  END IF
240 *
241  RETURN
242 *
243 * End of DDGT01
244 *
subroutine dsymm(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DSYMM
Definition: dsymm.f:191
subroutine dscal(N, DA, DX, INCX)
DSCAL
Definition: dscal.f:81
double precision function dlansy(NORM, UPLO, N, A, LDA, WORK)
DLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric matrix.
Definition: dlansy.f:124
double precision function dlange(NORM, M, N, A, LDA, WORK)
DLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: dlange.f:116
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: