SGSVTS
   Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
November 2006
November 2006
Purpose
SGSVTS tests SGGSVD, which computes the GSVD of an M-by-N matrix A
and a P-by-N matrix B:
U'*A*Q = D1*R and V'*B*Q = D2*R.
and a P-by-N matrix B:
U'*A*Q = D1*R and V'*B*Q = D2*R.
Arguments
| M | 
 
(input) INTEGER
 
The number of rows of the matrix A.  M >= 0. 
 | 
| P | 
 
(input) INTEGER
 
The number of rows of the matrix B.  P >= 0. 
 | 
| N | 
 
(input) INTEGER
 
The number of columns of the matrices A and B.  N >= 0. 
 | 
| A | 
 
(input) REAL array, dimension (LDA,M)
 
The M-by-N matrix A. 
 | 
| AF | 
 
(output) REAL array, dimension (LDA,N)
 
Details of the GSVD of A and B, as returned by SGGSVD, 
see SGGSVD for further details.  | 
| LDA | 
 
(input) INTEGER
 
The leading dimension of the arrays A and AF. 
LDA >= max( 1,M ).  | 
| B | 
 
(input) REAL array, dimension (LDB,P)
 
On entry, the P-by-N matrix B. 
 | 
| BF | 
 
(output) REAL array, dimension (LDB,N)
 
Details of the GSVD of A and B, as returned by SGGSVD, 
see SGGSVD for further details.  | 
| LDB | 
 
(input) INTEGER
 
The leading dimension of the arrays B and BF. 
LDB >= max(1,P).  | 
| U | 
 
(output) REAL array, dimension(LDU,M)
 
The M by M orthogonal matrix U. 
 | 
| LDU | 
 
(input) INTEGER
 
The leading dimension of the array U. LDU >= max(1,M). 
 | 
| V | 
 
(output) REAL array, dimension(LDV,M)
 
The P by P orthogonal matrix V. 
 | 
| LDV | 
 
(input) INTEGER
 
The leading dimension of the array V. LDV >= max(1,P). 
 | 
| Q | 
 
(output) REAL array, dimension(LDQ,N)
 
The N by N orthogonal matrix Q. 
 | 
| LDQ | 
 
(input) INTEGER
 
The leading dimension of the array Q. LDQ >= max(1,N). 
 | 
| ALPHA | 
 
(output) REAL array, dimension (N)
 
 | 
| BETA | 
 
(output) REAL array, dimension (N)
 
The generalized singular value pairs of A and B, the 
``diagonal'' matrices D1 and D2 are constructed from ALPHA and BETA, see subroutine SGGSVD for details.  | 
| R | 
 
(output) REAL array, dimension(LDQ,N)
 
The upper triangular matrix R. 
 | 
| LDR | 
 
(input) INTEGER
 
The leading dimension of the array R. LDR >= max(1,N). 
 | 
| IWORK | 
 
(workspace) INTEGER array, dimension (N)
 
 | 
| WORK | 
 
(workspace) REAL array, dimension (LWORK)
 
 | 
| LWORK | 
 
(input) INTEGER
 
The dimension of the array WORK, 
LWORK >= max(M,P,N)*max(M,P,N).  | 
| RWORK | 
 
(workspace) REAL array, dimension (max(M,P,N))
 
 | 
| RESULT | 
 
(output) REAL array, dimension (6)
 
The test ratios: 
RESULT(1) = norm( U'*A*Q - D1*R ) / ( MAX(M,N)*norm(A)*ULP) RESULT(2) = norm( V'*B*Q - D2*R ) / ( MAX(P,N)*norm(B)*ULP) RESULT(3) = norm( I - U'*U ) / ( M*ULP ) RESULT(4) = norm( I - V'*V ) / ( P*ULP ) RESULT(5) = norm( I - Q'*Q ) / ( N*ULP ) RESULT(6) = 0 if ALPHA is in decreasing order; = ULPINV otherwise.  |