20110103 162219.992 LINPACK_C_PRB FORTRAN77 version Test the LINPACK_C library. TEST01 For a complex Hermitian positive definite matrix, CCHDC computes the Cholesky decomposition. The number of equations is N = 3 The matrix A: 2.5281 0.0000 2.1341 -0.2147 2.4187 0.2932 2.1341 0.2147 3.0371 0.0000 2.0905 1.1505 2.4187 -0.2932 2.0905 -1.1505 2.7638 0.0000 Decompose the matrix. The Cholesky factor U: 1.5900 0.0000 1.3422 -0.1350 1.5212 0.1844 0.0000 0.0000 1.1033 0.0000 0.0668 0.6322 0.0000 0.0000 0.0000 0.0000 0.1076 0.0000 The product U^H * U: 2.5281 0.0000 2.1341 -0.2147 2.4187 0.2932 2.1341 0.2147 3.0371 0.0000 2.0905 1.1505 2.4187 -0.2932 2.0905 -1.1505 2.7638 0.0000 TEST02 For a complex Hermitian positive definite matrix, CCHEX can shift columns in a Cholesky factorization. The number of equations is N = 3 The matrix A: 2.5281 0.0000 2.1341 -0.2147 2.4187 0.2932 2.1341 0.2147 3.0371 0.0000 2.0905 1.1505 2.4187 -0.2932 2.0905 -1.1505 2.7638 0.0000 The vector Z: 1.00000 0.00000 2.00000 0.00000 3.00000 0.00000 Decompose the matrix. The Cholesky factor U: 1.5900 0.0000 1.3422 -0.1350 1.5212 0.1844 0.0000 0.0000 1.1033 0.0000 0.0668 0.6322 0.0000 0.0000 0.0000 0.0000 0.1076 0.0000 Right circular shift columns K = 1 through L = 3 Left circular shift columns K+1 = 2 through L = 3 The shifted Cholesky factor U: 1.6504 0.2001 1.3316 -0.5357 1.4655 0.0000 0.0000 0.0000 0.8500 -0.5045 -0.1357 -0.5905 0.0000 0.0000 0.0000 0.0000 -0.1051 -0.0463 The shifted vector Z: 1.28565 -0.722065 1.47222 -0.393939 3.08193 0.693803E-01 The shifted product U' * U: 2.7638 0.0000 2.0905 -1.1505 2.4187 -0.2932 2.0905 1.1505 3.0371 0.0000 2.1341 0.2147 2.4187 0.2932 2.1341 -0.2147 2.5281 0.0000 TEST03 For a complex Hermitian matrix CCHUD updates a Cholesky decomposition. CTRSL solves a triangular linear system. In this example, we use CCHUD to solve a least squares problem R * b = z. The number of equations is P = 20 Solution vector # 1 (Should be (1,1) (2,0), (3,1) (4,0) ...) 1 0.999979 1.00000 2 1.99999 0.157970E-04 3 3.00001 1.00000 4 3.99996 0.258004E-04 5 4.99996 1.00003 ...... .............. 16 16.0000 -0.372789E-04 17 17.0000 1.00002 18 18.0000 -0.382523E-05 19 19.0000 0.999961 20 20.0000 0.116174E-04 TEST04 For a complex general band storage matrix: CGBCO factors the matrix and estimates the reciprocal condition number. The matrix order is N = 3 The lower band is ML = 1 The upper band is MU = 1 The matrix A is 0.4499 -0.1267 0.5896 0.2601 0.0000 0.0000 -0.8432 -0.3443 0.3911 0.3234 -0.2361 0.0775 0.0000 0.0000 -0.1395 -0.1561 0.0186 -0.6332 Estimated reciprocal condition RCOND = 0.321778 TEST05 For a complex general band storage matrix: CGBFA factors the matrix; CGBSL solves a factored linear system. The matrix order is N = 3 The lower band is ML = 1 The upper band is MU = 1 The matrix A is 0.4499 -0.1267 0.5896 0.2601 0.0000 0.0000 -0.8432 -0.3443 0.3911 0.3234 -0.2361 0.0775 0.0000 0.0000 -0.1395 -0.1561 0.0186 -0.6332 The right hand side B is -0.1262 0.1961 -1.2899 -0.1811 0.2198 -0.2125 Computed Exact Solution Solution 0.892850 0.103136E-01 0.892850 0.103136E-01 -0.560465 0.763795 -0.560465 0.763795 0.306357 0.262753E-01 0.306357 0.262752E-01 TEST06 For a complex general band storage matrix: CGBFA factors the matrix. CGBDI computes the determinant. The matrix order is N = 3 The lower band is ML = 1 The upper band is MU = 1 The matrix A is 0.4499 -0.1267 0.5896 0.2601 0.0000 0.0000 -0.8432 -0.3443 0.3911 0.3234 -0.2361 0.0775 0.0000 0.0000 -0.1395 -0.1561 0.0186 -0.6332 Determinant = 3.16224 -3.91854 * 10** -1.00000 TEST07 For a complex general storage matrix: CGECO factors the matrix and estimates the reciprocal condition number. The matrix order is N = 3 The matrix A is 0.4499 -0.1267 0.3911 0.3234 0.0186 -0.6332 -0.8432 -0.3443 -0.1395 -0.1561 0.8928 0.0103 0.5896 0.2601 -0.2361 0.0775 -0.5605 0.7638 Estimated reciprocal condition RCOND = 0.122937E-01 TEST08 For a complex general storage matrix: CGEFA factors the matrix. CGESL solves a linear system. The matrix order is N = 3 The matrix A is 0.4499 -0.1267 0.3911 0.3234 0.0186 -0.6332 -0.8432 -0.3443 -0.1395 -0.1561 0.8928 0.0103 0.5896 0.2601 -0.2361 0.0775 -0.5605 0.7638 The right hand side B is 0.6063 -0.3917 -0.1281 -0.0787 -0.0931 0.5765 Computed Exact Solution Solution 0.306357 0.262754E-01 0.306357 0.262752E-01 0.500804 -0.779931 0.500804 -0.779931 0.350471 0.165551E-01 0.350471 0.165551E-01 TEST09 For a complex general storage matrix: CGEFA factors the matrix. CGEDI computes the determinant or inverse. The matrix order is N = 3 The matrix A is 0.4499 -0.1267 0.3911 0.3234 0.0186 -0.6332 -0.8432 -0.3443 -0.1395 -0.1561 0.8928 0.0103 0.5896 0.2601 -0.2361 0.0775 -0.5605 0.7638 Determinant = -3.63075 -5.58236 * 10** -2.00000 The product inv(A) * A is 1.0000 0.0000 -0.0000 -0.0000 0.0000 0.0000 -0.0000 0.0000 1.0000 -0.0000 -0.0000 0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0.0000 TEST10 For a complex tridiagonal matrix: CGTSL solves a linear system. Matrix order N = 10 Computed Exact Solution Solution 1.00000 10.0000 1.00000 10.0000 2.00000 20.0000 2.00000 20.0000 3.00000 30.0000 3.00000 30.0000 4.00000 40.0000 4.00000 40.0000 5.00000 50.0000 5.00000 50.0000 6.00000 60.0000 6.00000 60.0000 7.00000 70.0000 7.00000 70.0000 8.00000 80.0000 8.00000 80.0000 8.99998 90.0000 9.00000 90.0000 9.99998 100.000 10.0000 100.000 TEST11 For a complex Hermitian matrix: CHICO factors the matrix and estimates the reciprocal condition number. The matrix order is N = 3 The matrix A is 0.2184 0.0000 0.4685 -0.8584 -0.6458 0.3803 0.4685 0.8584 0.0661 0.0000 0.3911 0.3234 -0.6458 -0.3803 0.3911 -0.3234 0.0438 0.0000 Estimated reciprocal condition RCOND = 0.235919 TEST12 For a complex Hermitian matrix: CHIFA factors the matrix. CHISL solves a linear system. The matrix order is N = 3 The matrix A is 0.2184 0.0000 0.4685 -0.8584 -0.6458 0.3803 0.4685 0.8584 0.0661 0.0000 0.3911 0.3234 -0.6458 -0.3803 0.3911 -0.3234 0.0438 0.0000 The right hand side B is 0.3915 1.3499 0.4188 0.5569 -0.4378 -0.1823 Computed Exact Solution Solution 0.737082 0.301125 0.737082 0.301125 -0.545643 0.389631 -0.545643 0.389631 0.254327 -0.830657 0.254327 -0.830657 TEST13 For a complex hermitian matrix: CHIFA factors the matrix. CHIDI computes the determinant, inverse, or inertia. The matrix order is N = 3 The matrix A is 0.2184 0.0000 0.4685 -0.8584 -0.6458 0.3803 0.4685 0.8584 0.0661 0.0000 0.3911 0.3234 -0.6458 -0.3803 0.3911 -0.3234 0.0438 0.0000 Determinant = -8.70062 * 10** -1.00000 The inertia: 2 1 0 The product inv(A) * A is 1.0000 -0.0000 0.0000 0.0000 -0.0000 -0.0000 0.0000 0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000 0.0000 1.0000 0.0000 TEST14 For a complex Hermitian matrix using packed storage, CHPCO factors the matrix and estimates the reciprocal condition number. The matrix order is N = 3 The matrix A is 0.2184 0.0000 0.4685 -0.8584 0.5896 0.2601 0.4685 0.8584 0.5617 0.0000 0.3911 0.3234 0.5896 -0.2601 0.3911 -0.3234 0.0438 0.0000 Estimated reciprocal condition RCOND = 0.340064E-01 TEST15 For a complex Hermitian matrix, using packed storage, CHPFA factors the matrix. CHPSL solves a linear system. The matrix order is N = 3 The matrix A is 0.2184 0.0000 0.4685 -0.8584 0.5896 0.2601 0.4685 0.8584 0.5617 0.0000 0.3911 0.3234 0.5896 -0.2601 0.3911 -0.3234 0.0438 0.0000 The right hand side B is 0.6058 0.2931 0.1484 0.7500 0.4367 0.2783 Computed Exact Solution Solution 0.737082 0.301125 0.737082 0.301125 -0.545643 0.389631 -0.545643 0.389631 0.254327 -0.830657 0.254327 -0.830657 TEST16 For a complex hermitian matrix, using packed storage, CHPFA factors the matrix. CHPDI computes the determinant, inverse, or inertia. The matrix order is N = 3 The matrix A is 0.2184 0.0000 0.4685 -0.8584 0.5896 0.2601 0.4685 0.8584 0.5617 0.0000 0.3911 0.3234 0.5896 -0.2601 0.3911 -0.3234 0.0438 0.0000 Determinant = 1.21535 * 10** -1.00000 The inertia: 1 2 0 The product inv(A) * A is 1.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 0.0000 0.0000 1.0000 -0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 1.0000 0.0000 TEST17 For a complex positive definite hermitian band matrix, CPBCO estimates the reciprocal condition number. The matrix size is N = 3 Estimate the condition. Reciprocal condition = 0.153588 TEST18 For a complex positive definite hermitian band matrix, CPBDI computes the determinant as det = MANTISSA * 10**EXPONENT Determinant = 6.09571 * 10** 1.00000 TEST19 For a complex positive definite hermitian band matrix, CPBFA computes the LU factors. CPBSL solves a factored linear system. The matrix size is N = 3 Factor the matrix. Solve the linear system. The solution: (Should be roughly (1,2,3)): 1 1.00000 -0.140053E-07 2 2.00000 0.00000 3 3.00000 -0.712162E-07 TEST20 For a complex Hermitian positive definite matrix, CPOCO estimates the reciprocal condition number. The matrix size is N = 3 Estimate the condition. Reciprocal condition = 0.601908E-03 TEST21 For a complex Hermitian positive definite matrix, CPOFA computes the LU factors, CPODI computes the inverse or determinant. The matrix size is N = 3 Factor the matrix. Get the determinant and inverse. Determinant = 3.56020 * 10 ** -2.00000 First row of inverse: 75.8410 0.0000 -14.1735 -44.2781 -74.0824 31.3458 TEST22 For a complex Hermitian positive definite matrix, CPOFA computes the LU factors. CPOSL solves a factored linear system. The matrix size is N = 3 Factor the matrix. Solve the linear system. The solution: (Should be (1+2i),(3+4i),(5+6i): 1 1.00014 1.99994 2 3.00001 4.00010 3 4.99984 6.00000 TEST23 For a complex Hermitian positive definite packed matrix, CPPCO estimates the reciprocal condition number. The matrix size is N = 3 Estimate the condition number. Reciprocal condition number = 0.601908E-03 TEST24 For a complex Hermitian positive definite packed matrix, CPPFA factors the matrix. CPPDI computes the inverse or determinant. The matrix size is N = 3 Factor the matrix. Get the determinant and inverse. Determinant = 3.56020 * 10 ** -2.00000 Inverse: 75.8410 -0.0000 -14.1735 -44.2781 -74.0824 31.3458 -14.1735 44.2781 29.5232 -0.0000 -5.2299 -49.5355 -74.0824 -31.3458 -5.2299 49.5355 86.4448 -0.0000 TEST25 For a complex Hermitian positive definite packed matrix, CPPFA factors the matrix. CPPSL solves a factored linear system. The matrix size is N = 3 Factor the matrix. Solve the linear system. The solution: (Should be (1+2i),(3+4i),(5+6i): 1 1.00012 2.00029 2 2.99981 4.00002 3 5.00000 5.99967 TEST26 For a complex Hermitian positive definite tridiagonal matrix, CPTSL factors and solves a linear system. The matrix size is N = 3 Factor the matrix and solve the system. The solution: (Should be roughly (1,2,3)): 1 1.00000 0.394898E-07 2 2.00000 -0.843695E-07 3 3.00000 0.500480E-07 TEST27 For a complex general matrix, CQRDC computes the QR decomposition of a matrix, but does not return Q and R explicitly. Show how Q and R can be recovered using CQRSL. The matrix A is 0.4499 -0.1267 0.3911 0.3234 0.0186 -0.6332 -0.8432 -0.3443 -0.1395 -0.1561 0.8928 0.0103 0.5896 0.2601 -0.2361 0.0775 -0.5605 0.7638 Decompose the matrix. The packed matrix A which describes Q and R: -1.1644 0.3279 -0.2355 -0.2650 0.4991 -0.6664 -0.5938 -0.4629 0.1053 -0.4758 -1.1703 0.1429 0.4109 0.3391 -0.3781 0.6677 -0.0980 0.0561 The QRAUX vector, containing some additional information defining Q: 1.3864 0.0000 1.6413 0.0000 0.0000 0.0000 The R factor: -1.1644 0.3279 -0.2355 -0.2650 0.4991 -0.6664 0.0000 0.0000 0.1053 -0.4758 -1.1703 0.1429 0.0000 0.0000 0.0000 0.0000 -0.0980 0.0561 The Q factor: -0.3864 0.0000 -0.3098 0.6994 0.2701 0.4389 0.5938 0.4629 -0.2751 -0.1962 0.4090 0.3895 -0.4109 -0.3391 0.1152 -0.5362 0.6140 0.1962 The product Q * R: 0.4499 -0.1267 0.3911 0.3234 0.0186 -0.6332 -0.8432 -0.3443 -0.1395 -0.1561 0.8928 0.0103 0.5896 0.2601 -0.2361 0.0775 -0.5605 0.7638 TEST28 For a complex symmetric matrix: CSICO factors the matrix and estimates the reciprocal condition number. The matrix order is N = 3 The matrix A is 0.4499 -0.1267 -0.8432 -0.3443 0.5896 0.2601 -0.8432 -0.3443 0.3911 0.3234 -0.1395 -0.1561 0.5896 0.2601 -0.1395 -0.1561 -0.2361 0.0775 Estimated reciprocal condition RCOND = 0.475323E-01 TEST29 For a complex symmetric matrix: CSIFA factors the matrix. CSISL solves a linear system. The matrix order is N = 3 The matrix A is 0.4499 -0.1267 -0.8432 -0.3443 0.5896 0.2601 -0.8432 -0.3443 0.3911 0.3234 -0.1395 -0.1561 0.5896 0.2601 -0.1395 -0.1561 -0.2361 0.0775 The right hand side B is -1.3503 -0.2987 0.3096 0.8013 0.1259 -0.7331 Computed Exact Solution Solution 0.185992E-01 -0.633214 0.185994E-01 -0.633214 0.892849 0.103138E-01 0.892850 0.103136E-01 -0.560466 0.763795 -0.560465 0.763795 TEST30 For a complex symmetric matrix: CSIFA factors the matrix. CSIDI computes the determinant or inverse. The matrix order is N = 3 The matrix A is 0.4499 -0.1267 -0.8432 -0.3443 0.5896 0.2601 -0.8432 -0.3443 0.3911 0.3234 -0.1395 -0.1561 0.5896 0.2601 -0.1395 -0.1561 -0.2361 0.0775 Determinant = 0.943842 0.996662 * 10** -1.00000 The product inv(A) * A is 1.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000 0.0000 -0.0000 1.0000 0.0000 -0.0000 0.0000 -0.0000 -0.0000 -0.0000 0.0000 1.0000 0.0000 TEST31 For a complex symmetric matrix in packed storage, CSPCO factors the matrix and estimates the reciprocal condition number. The matrix order is N = 3 The matrix A is 0.4499 -0.1267 -0.8432 -0.3443 0.3911 0.3234 -0.8432 -0.3443 0.5896 0.2601 -0.1395 -0.1561 0.3911 0.3234 -0.1395 -0.1561 -0.2361 0.0775 Estimated reciprocal condition RCOND = 0.576192E-01 TEST32 For a complex symmetric matrix in packed storage, CSPFA factors the matrix. CSPSL solves a linear system. The matrix order is N = 3 The matrix A is 0.4499 -0.1267 -0.8432 -0.3443 0.3911 0.3234 -0.8432 -0.3443 0.5896 0.2601 -0.1395 -0.1561 0.3911 0.3234 -0.1395 -0.1561 -0.2361 0.0775 The right hand side B is -1.2874 -0.4858 0.4875 0.7468 0.1623 -0.6062 Computed Exact Solution Solution 0.185993E-01 -0.633214 0.185994E-01 -0.633214 0.892850 0.103139E-01 0.892850 0.103136E-01 -0.560465 0.763795 -0.560465 0.763795 TEST33 For a complex symmetric matrix in packed storage, CSPFA factors the matrix. CSPDI computes the determinant or inverse. The matrix order is N = 3 The matrix A is 0.4499 -0.1267 -0.8432 -0.3443 0.3911 0.3234 -0.8432 -0.3443 0.5896 0.2601 -0.1395 -0.1561 0.3911 0.3234 -0.1395 -0.1561 -0.2361 0.0775 Determinant = 0.788526 1.04145 * 10** -1.00000 The product inv(A) * A is 1.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000 0.0000 -0.0000 0.0000 0.0000 -0.0000 1.0000 -0.0000 TEST34 For an MxN matrix A in complex general storage, CSVDC computes the singular value decomposition: A = U * S * V^H Matrix rows M = 4 Matrix columns N = 3 The matrix A: 0.4499 -0.1267 -0.1395 -0.1561 -0.5605 0.7638 -0.8432 -0.3443 -0.2361 0.0775 0.3064 0.0263 0.5896 0.2601 0.0186 -0.6332 0.5008 -0.7799 0.3911 0.3234 0.8928 0.0103 0.3505 0.0166 Decompose the matrix. Singular values: 1 1.72997 0.00000 2 1.30087 0.00000 3 0.560498 0.00000 Left Singular Vector Matrix U: 0.0006 -0.3456 -0.6466 -0.1036 -0.1390 0.4739 0.3709 0.2651 -0.3518 -0.0920 0.4726 0.3090 -0.3977 -0.0478 0.3892 0.4868 0.6124 0.3271 0.1879 0.2403 0.3439 0.3499 0.0786 0.4219 0.1009 0.5061 -0.3989 0.0116 -0.0505 -0.5936 0.4616 0.0798 Right Singular Vector Matrix V: 0.5906 0.0000 -0.5855 0.0000 0.5554 0.0000 0.0170 0.5445 -0.3736 -0.0447 -0.4119 -0.6261 -0.1614 0.5731 0.1563 0.7009 0.3363 0.1295 The product U * S * V^H (should equal A): 0.4499 -0.1267 -0.1395 -0.1561 -0.5605 0.7638 -0.8432 -0.3443 -0.2361 0.0775 0.3064 0.0263 0.5896 0.2601 0.0186 -0.6332 0.5008 -0.7799 0.3911 0.3234 0.8928 0.0103 0.3505 0.0166 TEST345 For an MxN matrix A in complex general storage, CSVDC computes the singular value decomposition: A = U * S * V^H Matrix rows M = 4 Matrix columns N = 4 The matrix A: 1.0000 0.0000 1.0000 0.0000 1.0000 0.0000 1.0000 0.0000 -0.0000 -1.0000 -1.0000 -0.0000 1.0000 0.0000 0.0000 1.0000 -1.0000 -0.0000 -1.0000 -0.0000 1.0000 0.0000 -1.0000 -0.0000 0.0000 1.0000 1.0000 0.0000 1.0000 0.0000 -0.0000 -1.0000 Decompose the matrix. Singular values: 1 2.82843 0.00000 2 2.00000 0.00000 3 2.00000 0.00000 4 0.00000 0.00000 Left Singular Vector Matrix U: 0.3536 0.3536 -0.0707 0.4950 -0.3536 0.3536 0.0707 0.4950 -0.3536 -0.3536 -0.0707 0.4950 -0.3536 0.3536 -0.0707 -0.4950 -0.3536 -0.3536 -0.0707 0.4950 0.3536 -0.3536 0.0707 0.4950 0.3536 0.3536 -0.0707 0.4950 0.3536 -0.3536 -0.0707 -0.4950 Right Singular Vector Matrix V: 0.5000 0.0000 0.0000 0.0000 -0.7071 0.0000 0.5000 0.0000 0.5000 0.5000 0.0000 0.0000 0.0000 0.0000 -0.5000 -0.5000 0.0000 0.0000 -0.1414 0.9899 0.0000 0.0000 0.0000 0.0000 0.0000 0.5000 0.0000 0.0000 0.0000 0.7071 0.0000 0.5000 The product U * S * V^H (should equal A): 1.0000 0.0000 1.0000 0.0000 1.0000 -0.0000 1.0000 0.0000 0.0000 -1.0000 -1.0000 0.0000 1.0000 0.0000 -0.0000 1.0000 -1.0000 0.0000 -1.0000 -0.0000 1.0000 0.0000 -1.0000 -0.0000 0.0000 1.0000 1.0000 -0.0000 1.0000 0.0000 0.0000 -1.0000 TEST35 For a complex triangular matrix, CTRCO estimates the condition. Matrix order N = 3 Estimated reciprocal condition RCOND = 0.726135E-01 TEST36 For a complex triangular matrix, CTRDI computes the determinant or inverse. Matrix order N = 3 Determinant = -7.36715 1.31082 * 10** -2.00000 The product inv(A) * A is 1.0000 -0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 1.0000 -0.0000 TEST37 For a complex triangular matrix, CTRSL solves a linear system. Matrix order N = 10 Computed Exact Solution Solution 1.00000 10.0000 1.00000 10.0000 2.00000 20.0000 2.00000 20.0000 3.00000 30.0000 3.00000 30.0000 4.00001 40.0000 4.00000 40.0000 5.00000 50.0000 5.00000 50.0000 6.00002 60.0000 6.00000 60.0000 7.00001 70.0000 7.00000 70.0000 7.99998 80.0000 8.00000 80.0000 9.00000 90.0000 9.00000 90.0000 9.99997 100.000 10.0000 100.000 LINPACK_C_PRB Normal end of execution. 20110103 162219.996