20110103 134259.128 LINPACK_Z_PRB FORTRAN77 version Test the LINPACK_Z library. TEST01 For a double complex Hermitian positive definite matrix, ZCHDC 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 double complex Hermitian positive definite matrix, ZCHEX 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.722066 1.47223 -0.393939 3.08193 0.693794E-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 double complex Hermitian matrix ZCHUD updates a Cholesky decomposition. ZTRSL solves a triangular linear system. In this example, we use ZCHUD 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 1.00000 1.00000 2 2.00000 0.110184E-13 3 3.00000 1.00000 4 4.00000 0.935489E-13 5 5.00000 1.00000 ...... .............. 16 16.0000 -0.500357E-13 17 17.0000 1.00000 18 18.0000 -0.605630E-13 19 19.0000 1.00000 20 20.0000 -0.468847E-13 TEST04 For a double complex general band storage matrix: ZGBCO 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 double complex general band storage matrix: ZGBFA factors the matrix; ZGBSL 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.262752E-01 0.306357 0.262752E-01 TEST06 For a double complex general band storage matrix: ZGBFA factors the matrix. ZGBDI 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 double complex general storage matrix: ZGECO 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.122936E-01 TEST08 For a double complex general storage matrix: ZGEFA factors the matrix. ZGESL 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.262752E-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 double complex general storage matrix: ZGEFA factors the matrix. ZGEDI 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.63074 -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 double complex tridiagonal matrix: ZGTSL 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 9.00000 90.0000 9.00000 90.0000 10.0000 100.000 10.0000 100.000 TEST11 For a double complex Hermitian matrix: ZHICO 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 double complex Hermitian matrix: ZHIFA factors the matrix. ZHISL 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 double complex hermitian matrix: ZHIFA factors the matrix. ZHIDI 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 double complex Hermitian matrix using packed storage, ZHPCO 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 double complex Hermitian matrix, using packed storage, ZHPFA factors the matrix. ZHPSL 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 double complex hermitian matrix, using packed storage, ZHPFA factors the matrix. ZHPDI 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 double complex positive definite hermitian band matrix, ZPBCO estimates the reciprocal condition number. The matrix size is N = 3 Estimate the condition. Reciprocal condition = 0.153588 TEST18 For a double complex positive definite hermitian band matrix, ZPBDI computes the determinant as det = MANTISSA * 10**EXPONENT Determinant = 6.09571 * 10** 1.00000 TEST19 For a double complex positive definite hermitian band matrix, ZPBFA computes the LU factors. ZPBSL 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.302475E-07 2 2.00000 -0.896426E-07 3 3.00000 -0.217901E-07 TEST20 For a double complex Hermitian positive definite matrix, ZPOCO estimates the reciprocal condition number. The matrix size is N = 3 Estimate the condition. Reciprocal condition = 0.601901E-03 TEST21 For a double complex Hermitian positive definite matrix, ZPOFA computes the LU factors, ZPODI computes the inverse or determinant. The matrix size is N = 3 Factor the matrix. Get the determinant and inverse. Determinant = 3.56016 * 10 ** -2.00000 First row of inverse: 75.8419 0.0000 -14.1737 -44.2786 -74.0833 31.3461 TEST22 For a double complex Hermitian positive definite matrix, ZPOFA computes the LU factors. ZPOSL 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.00000 2.00000 2 3.00000 4.00000 3 5.00000 6.00000 TEST23 For a double complex Hermitian positive definite packed matrix, ZPPCO estimates the reciprocal condition number. The matrix size is N = 3 Estimate the condition number. Reciprocal condition number = 0.601901E-03 TEST24 For a double complex Hermitian positive definite packed matrix, ZPPFA factors the matrix. ZPPDI computes the inverse or determinant. The matrix size is N = 3 Factor the matrix. Get the determinant and inverse. Determinant = 3.56016 * 10 ** -2.00000 Inverse: 75.8419 -0.0000 -14.1737 -44.2786 -74.0833 31.3461 -14.1737 44.2786 29.5236 -0.0000 -5.2300 -49.5361 -74.0833 -31.3461 -5.2300 49.5361 86.4459 -0.0000 TEST25 For a double complex Hermitian positive definite packed matrix, ZPPFA factors the matrix. ZPPSL 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.00003 2.00002 2 2.99998 4.00002 3 4.99997 5.99997 TEST26 For a double complex Hermitian positive definite tridiagonal matrix, ZPTSL 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.302475E-07 2 2.00000 -0.896426E-07 3 3.00000 -0.217901E-07 TEST27 For a double complex general matrix, ZQRDC computes the QR decomposition of a matrix, but does not return Q and R explicitly. Show how Q and R can be recovered using ZQRSL. 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 double complex symmetric matrix: ZSICO 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 double complex symmetric matrix: ZSIFA factors the matrix. ZSISL 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.185993E-01 -0.633214 0.185993E-01 -0.633214 0.892850 0.103136E-01 0.892850 0.103136E-01 -0.560465 0.763795 -0.560465 0.763795 TEST30 For a double complex symmetric matrix: ZSIFA factors the matrix. ZSIDI 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.943843 0.996661 * 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 double complex symmetric matrix in packed storage, ZSPCO 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 double complex symmetric matrix in packed storage, ZSPFA factors the matrix. ZSPSL 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.185993E-01 -0.633214 0.892850 0.103136E-01 0.892850 0.103136E-01 -0.560465 0.763795 -0.560465 0.763795 TEST33 For a double complex symmetric matrix in packed storage, ZSPFA factors the matrix. ZSPDI 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.788527 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 double complex general storage, ZSVDC 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 double complex general storage, ZSVDC 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.4218 -0.2684 -0.3536 0.3536 -0.3298 0.3758 -0.3536 -0.3536 0.4218 -0.2684 -0.3536 0.3536 0.3298 -0.3758 -0.3536 -0.3536 0.4218 -0.2684 0.3536 -0.3536 -0.3298 0.3758 0.3536 0.3536 0.4218 -0.2684 0.3536 -0.3536 0.3298 -0.3758 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.8437 -0.5369 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 double complex triangular matrix, ZTRCO estimates the condition. Matrix order N = 3 Estimated reciprocal condition RCOND = 0.726135E-01 TEST36 For a double complex triangular matrix, ZTRDI 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 double complex triangular matrix, ZTRSL 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 9.00000 90.0000 9.00000 90.0000 10.0000 100.000 10.0000 100.000 LINPACK_Z_PRB Normal end of execution. 20110103 134259.132