 ==============================================================
 DSVDC Advanced Test Program START
 ==============================================================

--- Test Case  1: Original Example (N=4, P=3, JOB=11) ---
 Input Matrix X:
N=4, P=3, JOB=11
 Matrix elements (first few rows/cols if large):
  1.0000E+00   2.0000E+00   3.0000E+00
  4.0000E+00   5.0000E+00   6.0000E+00
  7.0000E+00   8.0000E+00   9.0000E+00
  1.0000E+01   1.1000E+01   1.2000E+01

 SVD Results:
INFO = 0
Singular values S =   2.5462E+01   1.2907E+00   8.7449E-16
Superdiagonal E (full) =   0.0000E+00   0.0000E+00   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
  -0.141   -0.825   -0.167   -0.522
  -0.344   -0.426    0.611    0.571
  -0.547   -0.028   -0.722    0.423
  -0.750    0.371    0.278   -0.472

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -0.505    0.761   -0.408
  -0.575    0.057    0.816
  -0.644   -0.646   -0.408

 --------------------------------------------------------------

--- Test Case  2: Square Well-Conditioned (N=3, P=3, JOB=11) ---
 Input Matrix X:
N=3, P=3, JOB=11
 Matrix elements (first few rows/cols if large):
  4.0000E+00   1.0000E+00  -1.0000E+00
  1.0000E+00   2.0000E+00   1.0000E+00
 -1.0000E+00   1.0000E+00   3.0000E+00

 SVD Results:
INFO = 0
Singular values S =   4.6751E+00   3.5392E+00   7.8568E-01
Superdiagonal E (full) =   0.0000E+00   0.0000E+00  -0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
  -0.888   -0.233   -0.397
  -0.172   -0.632    0.756
   0.427   -0.739   -0.521

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -0.888   -0.233   -0.397
  -0.172   -0.632    0.756
   0.427   -0.739   -0.521

 --------------------------------------------------------------

--- Test Case  3: Tall Matrix (N=5, P=2, JOB=11) ---
 Input Matrix X:
N=5, P=2, JOB=11
 Matrix elements (first few rows/cols if large):
  1.0000E+00   6.0000E+00
  2.0000E+00   7.0000E+00
  3.0000E+00   8.0000E+00
  4.0000E+00   9.0000E+00
  5.0000E+00   1.0000E+01

 SVD Results:
INFO = 0
Singular values S =   1.9538E+01   1.8096E+00
Superdiagonal E (full) =   0.0000E+00   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
  -0.304   -0.712   -0.374   -0.365   -0.357
  -0.371   -0.403   -0.008    0.371    0.750
  -0.437   -0.094    0.862   -0.159   -0.179
  -0.504    0.215   -0.206    0.665   -0.464
  -0.570    0.524   -0.274   -0.512    0.251

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -0.370    0.929
  -0.929   -0.370

 --------------------------------------------------------------

--- Test Case  4: Wide Matrix (N=2, P=5, JOB=11) ---
 Input Matrix X:
N=2, P=5, JOB=11
 Matrix elements (first few rows/cols if large):
  1.0000E+00   2.0000E+00   3.0000E+00   4.0000E+00   5.0000E+00
  6.0000E+00   7.0000E+00   8.0000E+00   9.0000E+00   1.0000E+01

 SVD Results:
INFO = 0
Singular values S =   1.9538E+01   1.8096E+00
Superdiagonal E (full) =   0.0000E+00   0.0000E+00   0.0000E+00  -4.2690E-01  -9.0296E-01

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
  -0.370   -0.929
  -0.929    0.370

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -0.304    0.712    0.632    0.000    0.000
  -0.371    0.403   -0.632   -0.416   -0.356
  -0.437    0.094   -0.316    0.289    0.785
  -0.504   -0.215   -0.000    0.670   -0.501
  -0.570   -0.524    0.316   -0.543    0.073

 --------------------------------------------------------------

--- Test Case  5: Rank Deficient (N=3, P=3, Col3=Col1+Col2, JOB=11) ---
 Input Matrix X:
N=3, P=3, JOB=11
 Matrix elements (first few rows/cols if large):
  1.0000E+00   4.0000E+00   5.0000E+00
  2.0000E+00   5.0000E+00   7.0000E+00
  3.0000E+00   6.0000E+00   9.0000E+00

 SVD Results:
INFO = 0
Singular values S =   1.5663E+01   8.1259E-01   4.4612E-17
Superdiagonal E (full) =   0.0000E+00   0.0000E+00   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
  -0.412    0.815    0.408
  -0.564    0.124   -0.816
  -0.716   -0.566    0.408

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -0.235   -0.782   -0.577
  -0.559    0.595   -0.577
  -0.795   -0.187    0.577

 Expected: One singular value should be close to zero.
 --------------------------------------------------------------

--- Test Case  6: Zero Matrix (N=3, P=2, JOB=11) ---
 Input Matrix X:
N=3, P=2, JOB=11
 Matrix elements (first few rows/cols if large):
  0.0000E+00   0.0000E+00
  0.0000E+00   0.0000E+00
  0.0000E+00   0.0000E+00

 SVD Results:
INFO = 0
Singular values S =  -0.0000E+00  -0.0000E+00
Superdiagonal E (full) =   0.0000E+00   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
   1.000    0.000    0.000
   0.000    1.000    0.000
   0.000    0.000    1.000

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
   1.000    0.000
   0.000    1.000

 Expected: All singular values should be close to zero.
 --------------------------------------------------------------

--- Test Case  7: Diagonal Matrix (N=3, P=3, JOB=11) ---
 Input Matrix X:
N=3, P=3, JOB=11
 Matrix elements (first few rows/cols if large):
  5.0000E+00   0.0000E+00   0.0000E+00
  0.0000E+00  -2.0000E+00   0.0000E+00
  0.0000E+00   0.0000E+00   1.0000E+00

 SVD Results:
INFO = 0
Singular values S =   5.0000E+00   2.0000E+00   1.0000E+00
Superdiagonal E (full) =   0.0000E+00   0.0000E+00   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
  -1.000    0.000    0.000
  -0.000   -1.000    0.000
  -0.000    0.000    1.000

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -1.000    0.000    0.000
  -0.000    1.000    0.000
  -0.000    0.000    1.000

 Expected: Singular values should be ABS of diagonal entries (5, 2, 1), possibly reordered.
 --------------------------------------------------------------

--- Test Case  8: Diagonal Matrix with repeated SVs (N=3, P=3, JOB=11) ---
 Input Matrix X:
N=3, P=3, JOB=11
 Matrix elements (first few rows/cols if large):
  2.0000E+00   0.0000E+00   0.0000E+00
  0.0000E+00  -2.0000E+00   0.0000E+00
  0.0000E+00   0.0000E+00   1.0000E+00

 SVD Results:
INFO = 0
Singular values S =   2.0000E+00   2.0000E+00   1.0000E+00
Superdiagonal E (full) =   0.0000E+00   0.0000E+00   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
  -1.000    0.000    0.000
  -0.000   -1.000    0.000
  -0.000    0.000    1.000

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -1.000    0.000    0.000
  -0.000    1.000    0.000
  -0.000    0.000    1.000

 Expected: Singular values should be (2, 2, 1), possibly reordered.
 --------------------------------------------------------------

--- Test Case  9: 1x1 Matrix (N=1, P=1, JOB=11) ---
 Input Matrix X:
N=1, P=1, JOB=11
 Matrix elements (first few rows/cols if large):
 -7.0000E+00

 SVD Results:
INFO = 0
Singular values S =   7.0000E+00
Superdiagonal E (full) =   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
   1.000

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -1.000

 Expected: Singular value should be 7.
 --------------------------------------------------------------

--- Test Case 10: 2x1 Matrix (N=2, P=1, JOB=11) ---
 Input Matrix X:
N=2, P=1, JOB=11
 Matrix elements (first few rows/cols if large):
  3.0000E+00
  4.0000E+00

 SVD Results:
INFO = 0
Singular values S =   5.0000E+00
Superdiagonal E (full) =   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
  -0.600   -0.800
  -0.800    0.600

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -1.000

 Expected: Singular value should be 5.
 --------------------------------------------------------------

--- Test Case 11: 1x2 Matrix (N=1, P=2, JOB=11) ---
 Input Matrix X:
N=1, P=2, JOB=11
 Matrix elements (first few rows/cols if large):
  3.0000E+00   4.0000E+00

 SVD Results:
INFO = 0
Singular values S =   5.0000E+00
Superdiagonal E (full) =   0.0000E+00   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
   1.000

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
   0.600   -0.800
   0.800    0.600

 Expected: Singular value should be 5.
 --------------------------------------------------------------

--- Test Case 12: Ill-conditioned like (Diagonal N=2, P=2, JOB=11) ---
 Input Matrix X:
N=2, P=2, JOB=11
 Matrix elements (first few rows/cols if large):
  1.0000E+08   0.0000E+00
  0.0000E+00   1.0000E-08

 SVD Results:
INFO = 0
Singular values S =   1.0000E+08   1.0000E-08
Superdiagonal E (full) =   0.0000E+00   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
  -1.000    0.000
  -0.000    1.000

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -1.000    0.000
  -0.000    1.000

 Expected: Singular values 1E8 and 1E-8. Check convergence (info=0).
 --------------------------------------------------------------

 --- Testing different JOB values with N=4, P=3 matrix ---
--- Test Case 13: JOB=00 (S only)
 ---
 Input Matrix X:
N=4, P=3, JOB=0
 Matrix elements (first few rows/cols if large):
  1.0000E+00   2.0000E+00   3.0000E+00
  4.0000E+00   5.0000E+00   6.0000E+00
  7.0000E+00   8.0000E+00   9.0000E+00
  1.0000E+01   1.1000E+01   1.2000E+01

 SVD Results:
INFO = 0
Singular values S =   2.5462E+01   1.2907E+00   8.7449E-16
Superdiagonal E (full) =   0.0000E+00   0.0000E+00   0.0000E+00

 Matrix U was not computed (JOB).

 Matrix V was not computed (JOB).

 --------------------------------------------------------------

--- Test Case 14: JOB=01 (S, V)
 ---
 Input Matrix X:
N=4, P=3, JOB=1
 Matrix elements (first few rows/cols if large):
  1.0000E+00   2.0000E+00   3.0000E+00
  4.0000E+00   5.0000E+00   6.0000E+00
  7.0000E+00   8.0000E+00   9.0000E+00
  1.0000E+01   1.1000E+01   1.2000E+01

 SVD Results:
INFO = 0
Singular values S =   2.5462E+01   1.2907E+00   8.7449E-16
Superdiagonal E (full) =   0.0000E+00   0.0000E+00   0.0000E+00

 Matrix U was not computed (JOB).

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -0.505    0.761   -0.408
  -0.575    0.057    0.816
  -0.644   -0.646   -0.408

 --------------------------------------------------------------

--- Test Case 15: JOB=10 (S, U full)
 ---
 Input Matrix X:
N=4, P=3, JOB=10
 Matrix elements (first few rows/cols if large):
  1.0000E+00   2.0000E+00   3.0000E+00
  4.0000E+00   5.0000E+00   6.0000E+00
  7.0000E+00   8.0000E+00   9.0000E+00
  1.0000E+01   1.1000E+01   1.2000E+01

 SVD Results:
INFO = 0
Singular values S =   2.5462E+01   1.2907E+00   8.7449E-16
Superdiagonal E (full) =   0.0000E+00   0.0000E+00   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x N)
  -0.141   -0.825   -0.167   -0.522
  -0.344   -0.426    0.611    0.571
  -0.547   -0.028   -0.722    0.423
  -0.750    0.371    0.278   -0.472

 Matrix V was not computed (JOB).

 --------------------------------------------------------------

--- Test Case 16: JOB=21 (S, U thin, V)
 ---
 Input Matrix X:
N=4, P=3, JOB=21
 Matrix elements (first few rows/cols if large):
  1.0000E+00   2.0000E+00   3.0000E+00
  4.0000E+00   5.0000E+00   6.0000E+00
  7.0000E+00   8.0000E+00   9.0000E+00
  1.0000E+01   1.1000E+01   1.2000E+01

 SVD Results:
INFO = 0
Singular values S =   2.5462E+01   1.2907E+00   8.7449E-16
Superdiagonal E (full) =   0.0000E+00   0.0000E+00   0.0000E+00

 Matrix U (first few rows/cols if large):
 (Computed as N x min(N,P))
  -0.141   -0.825   -0.167
  -0.344   -0.426    0.611
  -0.547   -0.028   -0.722
  -0.750    0.371    0.278

 Matrix V (first few rows/cols if large):
 (Computed as P x P)
  -0.505    0.761   -0.408
  -0.575    0.057    0.816
  -0.644   -0.646   -0.408

 --------------------------------------------------------------

 ==============================================================
 DSVDC Advanced Test Program END
 ==============================================================
