03 June 2024 9:46:33.668 AM linpack_d_test(): FORTRAN90 version Test LINPACK_D(). TEST01 For real ( kind = 8 ), general storage, DCHDC computes the Cholesky decomposition. The number of equations is N = 4 The matrix A: 2.00000 -1.00000 0.00000 0.00000 0.00000 2.00000 -1.00000 0.00000 0.00000 0.00000 2.00000 -1.00000 0.00000 0.00000 0.00000 2.00000 Decompose the matrix. The Cholesky factor U: 1.41421 -0.707107 0.00000 0.00000 0.00000 1.22474 -0.816497 0.00000 0.00000 0.00000 1.15470 -0.866025 0.00000 0.00000 0.00000 1.11803 The product U' * U: 2.00000 -1.00000 0.00000 0.00000 -1.00000 2.00000 -1.00000 0.00000 0.00000 -1.00000 2.00000 -1.00000 0.00000 0.00000 -1.00000 2.00000 TEST02 For double precision real general storage, DCHEX can shift columns in a Cholesky factorization. The number of equations is N = 5 The matrix A: 2.00000 -1.00000 0.00000 0.00000 0.00000 0.00000 2.00000 -1.00000 0.00000 0.00000 0.00000 0.00000 2.00000 -1.00000 0.00000 0.00000 0.00000 0.00000 2.00000 -1.00000 0.00000 0.00000 0.00000 0.00000 2.00000 The vector Z: 1.00000 2.00000 3.00000 4.00000 5.00000 Decompose the matrix. The Cholesky factor U: 1.41421 -0.707107 0.00000 0.00000 0.00000 0.00000 1.22474 -0.816497 0.00000 0.00000 0.00000 0.00000 1.15470 -0.866025 0.00000 0.00000 0.00000 0.00000 1.11803 -0.894427 0.00000 0.00000 0.00000 0.00000 1.09545 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.41421 -0.707107 0.00000 -0.707107 0.00000 0.00000 -1.22474 0.816497 0.408248 -0.00000 0.00000 0.00000 1.15470 -0.288675 0.00000 0.00000 0.00000 0.00000 1.11803 -0.894427 0.00000 0.00000 0.00000 0.00000 1.09545 The shifted vector Z: 1.29479 -2.17020 2.75931 4.00000 5.00000 The shifted product U' * U: 2.00000 -1.00000 0.00000 -1.00000 0.00000 -1.00000 2.00000 -1.00000 0.00000 0.00000 0.00000 -1.00000 2.00000 0.00000 0.00000 -1.00000 0.00000 0.00000 2.00000 -1.00000 0.00000 0.00000 0.00000 -1.00000 2.00000 TEST03 For double precision real general storage, DCHUD updates a Cholesky decomposition. DTRSL can solve a triangular linear system. In this example, we use DCHUD to solve a least squares problem R * b = z. The number of equations is P = 20 Solution vector # 1 (Should be (1,2,3...,n)) 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 ...... .............. 16 16.0000 17 17.0000 18 18.0000 19 19.0000 20 20.0000 TEST04 For a banded matrix in general format, DGBCO estimates the reciprocal condition number. The matrix size is N = 10 The bandwidth of the matrix is 3 Estimate the condition. Estimated reciprocal condition = 0.233017E-01 TEST05 For a banded matrix in general format, DGBFA factors the matrix, DGBSL solves a factored linear system. The matrix size is N = 10 The bandwidth of the matrix is 3 Factor the matrix. Solve the linear system. The first and last 5 solution entries: (All should be 1): 1 1.00000 2 1.00000 3 1.00000 4 1.00000 5 1.00000 ...... .............. 6 1.00000 7 1.00000 8 1.00000 9 1.00000 10 1.00000 TEST06 For a banded matrix in general format, DGBFA factors the matrix, DGBDI computes the determinant as det = MANTISSA * 10**EXPONENT Find the determinant of the -1,2,-1 matrix for N = 2, 4, 8, 16, 32, 64, 128. (For this matrix, det ( A ) = N + 1.) The bandwidth of the matrix is 3 N Mantissa Exponent 2 3.00000 0.00000 4 5.00000 0.00000 8 9.00000 0.00000 16 1.70000 1.00000 32 3.30000 1.00000 64 6.50000 1.00000 128 1.29000 2.00000 TEST07 For a banded matrix in general format, DGBFA factors the matrix, DGBSL solves a factored linear system. The matrix size is N = 100 The bandwidth of the matrix is 51 Factor the matrix. Solve the linear system. The first and last 5 solution entries: (All should be 1): 1 1.00000 2 1.00000 3 1.00000 4 1.00000 5 1.00000 ...... .............. 96 1.00000 97 1.00000 98 1.00000 99 1.00000 100 1.00000 TEST08 DGECO factors a general matrix and computes its reciprocal condition number; DGESL solves a factored linear system. The matrix size is N = 3 Factor the matrix. The reciprocal matrix condition number = 0.246445E-01 Solve the linear system. Solution returned by DGESL (Should be (1,2,3)) 1.00000 2.00000 3.00000 Call DGESL for a new right hand side for the same, factored matrix. Solve a linear system. Solution returned by DGESL (should be (1,0,0)) 1.00000 0.00000 0.00000 Call DGESL for transposed problem. Call DGESL to solve a transposed linear system. Solution returned by DGESL (should be (-1,0,1)) -1.00000 -0.394746E-15 1.00000 TEST09 DGEFA factors a general matrix; DGEDI computes the inverse and determinant of a factored matrix. The matrix size is N = 3 Factor the matrix Get the inverse and determinant The determinant = 2.70000 * 10 ** 1.00000 The inverse matrix: -1.77778 0.888889 -0.111111 1.55556 -0.777778 0.222222 -0.111111 0.222222 -0.111111 TEST10 DGEFA factors a general matrix; DGESL solves a factored linear system; The number of equations is N = 3 The matrix A: 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 0.00000 The right hand side B is 14.0000 32.0000 23.0000 Factor the matrix Solve the linear system. DGESL returns the solution: (Should be (1,2,3)) 1.00000 2.00000 3.00000 TEST11 DGEFA factors a general matrix; DGESL solves a factored linear system; The matrix size is N = 100 Factor the matrix. Solve the linear system. The first and last five solution entries: (All of them should be 1.) 1 1.00000 2 1.00000 3 1.00000 4 1.00000 5 1.00000 ...... .............. 96 1.00000 97 1.00000 98 1.00000 99 1.00000 100 1.00000 TEST12 For a general tridiagonal matrix, DGTSL factors and solves a linear system. The matrix size is N = 100 Factor the matrix and solve the system. The first and last 5 solution entries: (Should be (1,2,3,4,5,...,n-1,n)) 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 ...... .............. 96 96.0000 97 97.0000 98 98.0000 99 99.0000 100 100.000 TEST13 For a positive definite symmetric band matrix, DPBCO estimates the reciprocal condition number. The matrix size is N = 10 Estimate the condition. Reciprocal condition = 0.204918E-01 TEST14 For a positive definite symmetric band matrix, DPBDI computes the determinant as det = MANTISSA * 10**EXPONENT Find the determinant of the -1,2,-1 matrix for N = 2, 4, 8, 16, 32, 64, 128. (For this matrix, det ( A ) = N + 1.) The bandwidth of the matrix is 3 N Mantissa Exponent 2 3.00000 0.00000 4 5.00000 0.00000 8 9.00000 0.00000 16 1.70000 1.00000 32 3.30000 1.00000 64 6.50000 1.00000 128 1.29000 2.00000 TEST15 For a positive definite symmetric band matrix, DPBFA computes the LU factors. DPBSL solves a factored linear system. The matrix size is N = 10 Factor the matrix. Solve the linear system. The first and last 5 solution entries: (All should be 1): 1 1.00000 2 1.00000 3 1.00000 4 1.00000 5 1.00000 ...... .............. 6 1.00000 7 1.00000 8 1.00000 9 1.00000 10 1.00000 TEST16 For a positive definite symmetric matrix, DPOCO estimates the reciprocal condition number. The matrix size is N = 5 Estimate the condition. Reciprocal condition = 0.675676E-01 TEST17 For a positive definite symmetric matrix, DPOFA computes the LU factors, DPODI computes the inverse or determinant. The matrix size is N = 5 Factor the matrix. Get the determinant and inverse. Determinant = 6.00000 * 10 ** 0.00000 First row of inverse: 0.833333 0.666667 0.500000 0.333333 0.166667 TEST18 For a positive definite symmetric matrix, DPOFA computes the LU factors. DPOSL solves a factored linear system. The matrix size is N = 20 Factor the matrix. Solve the linear system. The first and last 5 solution entries: (Should be 1,2,3,4,5,...,n-1,n): 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 ...... .............. 16 16.0000 17 17.0000 18 18.0000 19 19.0000 20 20.0000 TEST19 For a positive definite symmetric packed matrix, DPPCO estimates the reciprocal condition number. The matrix size is N = 5 Estimate the condition number. Reciprocal condition number = 0.675676E-01 TEST20 For a positive definite symmetric packed matrix, DPPFA factors the matrix. DPPDI computes the inverse or determinant. The matrix size is N = 5 Factor the matrix. Get the determinant and inverse. Determinant = 6.00000 * 10 ** 0.00000 Inverse: 0.833333 0.666667 0.500000 0.333333 0.166667 0.666667 1.33333 1.00000 0.666667 0.333333 0.500000 1.00000 1.50000 1.00000 0.500000 0.333333 0.666667 1.00000 1.33333 0.666667 0.166667 0.333333 0.500000 0.666667 0.833333 TEST21 For a positive definite symmetric packed matrix, DPPFA factors the matrix. DPPSL solves a factored linear system. The matrix size is N = 20 Factor the matrix. Solve the linear system. The first and last 5 solution entries: (Should be 1,2,3,4,5,...,n-1,n): 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 ...... .............. 16 16.0000 17 17.0000 18 18.0000 19 19.0000 20 20.0000 TEST22 For a positive definite symmetric tridiagonal matrix, DPTSL factors and solves a linear system. The matrix size is N = 20 Factor the matrix and solve the system. The first and last 5 solution entries: (Should be 1,2,3,4,5,...,n-1,n): 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 ...... .............. 16 16.0000 17 17.0000 18 18.0000 19 19.0000 20 20.0000 DQRDC_TEST DQRDC computes the QR decomposition of a rectangular matrix, but does not return Q and R explicitly. Show how Q and R can be recovered using DQRSL. The original matrix A: 1.00000 1.00000 0.00000 1.00000 0.00000 1.00000 0.00000 1.00000 1.00000 Decompose the matrix. The packed matrix A which describes Q and R: -1.41421 -0.707107 -0.707107 0.707107 1.22474 0.408248 0.00000 -0.816497 1.15470 The QRAUX vector, containing some additional information defining Q: 1.70711 1.57735 0.00000 The R factor: -1.41421 -0.707107 -0.707107 0.00000 1.22474 0.408248 0.00000 0.00000 1.15470 The Q factor: -0.707107 0.408248 -0.577350 -0.707107 -0.408248 0.577350 0.00000 0.816497 0.577350 The product Q * R: 1.00000 1.00000 -0.198977E-15 1.00000 -0.555112E-16 1.00000 0.00000 1.00000 1.00000 DQRSL_TEST DQRSL solves a rectangular linear system A*x=b in the least squares sense after A has been factored by DQRDC. The matrix A: 1.00000 1.00000 1.00000 1.00000 2.00000 4.00000 1.00000 3.00000 9.00000 1.00000 4.00000 16.0000 1.00000 5.00000 25.0000 Decompose the matrix. X X(expected): -3.02000 -3.02000 4.49143 4.49143 -0.728571 -0.728571 TEST24 For a symmetric indefinite matrix, DSICO estimates the reciprocal condition number. The matrix size is N = 100 Estimate the condition. Estimated reciprocal condition = 0.245050E-03 TEST25 For a symmetric indefinite matrix, DSIFA factors the matrix, DSISL solves a factored linear system, The matrix size is N = 100 Factor the matrix. Solve the linear system. The first and last 5 solution entries: (Should be (1,2,3,4,5,...,n-1,n)) 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 ...... .............. 96 96.0000 97 97.0000 98 98.0000 99 99.0000 100 100.000 TEST26 For a symmetric indefinite packed matrix, DSPCO estimates the reciprocal condition number. The matrix size is N = 100 Estimate the condition. Estimated reciprocal condition = 0.245050E-03 TEST27 For a symmetric indefinite packed matrix, DSPFA factors the matrix, DSPSL solves a factored linear system. The matrix size is N = 100 Factor the matrix. Solve the linear system. The first and last 5 solution entries: (Should be (1,2,3,4,5,...,n-1,n)) 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 ...... .............. 96 96.0000 97 97.0000 98 98.0000 99 99.0000 100 100.000 DSVDC_TEST For an MxN matrix A in general storage, DSVDC computes the singular value decomposition: A = U * S * V' Matrix rows M = 6 Matrix columns N = 4 The matrix A: 0.9614 0.0268 0.9326 0.4481 0.5049 0.8481 0.6157 0.2347 0.2701 0.1057 0.0394 0.3733 0.6477 0.8321 0.7574 0.5807 0.8788 0.9928 0.8984 0.6874 0.9494 0.5352 0.0521 0.2704 Decompose the matrix. Singular values: 1 2.96442 2 0.796718 3 0.645783 4 0.336851 Left Singular Vector Matrix U: -0.4129 0.8734 -0.1442 0.1903 -0.0709 0.0683 -0.3804 -0.3870 -0.1865 0.4918 -0.2853 0.5895 -0.1246 0.0791 0.2213 -0.7521 -0.2333 0.5560 -0.4733 -0.2052 -0.2185 -0.2537 -0.5508 -0.5642 -0.5843 -0.1934 -0.1480 -0.2096 0.7451 -0.0153 -0.3223 -0.0410 0.9087 0.2191 -0.0241 -0.1417 Right Singular Vector Matrix V: -0.5899 0.4065 0.6474 0.2602 -0.5037 -0.8549 0.0291 0.1210 -0.5142 0.3114 -0.7615 0.2423 -0.3658 0.0839 -0.0135 -0.9268 The product U * S * V' (should equal A): 0.9614 0.0268 0.9326 0.4481 0.5049 0.8481 0.6157 0.2347 0.2701 0.1057 0.0394 0.3733 0.6477 0.8321 0.7574 0.5807 0.8788 0.9928 0.8984 0.6874 0.9494 0.5352 0.0521 0.2704 DTRCO_TEST DTRCO computes the LU factors of a triangular matrix, and its reciprocal condition number. The matrix size is N = 5 Lower triangular matrix A: 0.597893 0.00000 0.00000 0.00000 0.00000 0.208689 0.963943 0.00000 0.00000 0.00000 0.781811 0.619054 0.843195 0.00000 0.00000 0.266768 0.279478 0.166847 0.213306 0.00000 0.940339 0.736883 0.116964 0.647188 0.270965 Estimate the condition: The reciprocal condition number = 0.348946E-01 Upper triangular matrix A: 0.891723 0.640168 0.982618E-01 0.751134 0.689371E-01 0.00000 0.812782 0.793512 0.617003 0.404423 0.00000 0.00000 0.414052 0.968923 0.303617 0.00000 0.00000 0.00000 0.830823 0.548274E-01 0.00000 0.00000 0.00000 0.00000 0.317481 Estimate the condition: The reciprocal condition number = 0.532014E-01 DTRDI_TEST DTRDI computes the determinant or inverse of a triangular matrix. The matrix size is N = 5 Lower triangular matrix A: 0.619704 0.00000 0.00000 0.00000 0.00000 0.951581 0.844988 0.00000 0.00000 0.00000 0.161460E-01 0.355658 0.209922 0.00000 0.00000 0.729130 0.115059E-01 0.357238 0.658432 0.00000 0.288759 0.676868 0.163541 0.623331 0.175677 The determinant = 1.27151 * 10 ** -2.00000 The inverse matrix: 1.61367 0.00000 0.00000 0.00000 0.00000 -1.81724 1.18345 0.00000 0.00000 0.00000 2.95471 -2.00504 4.76367 0.00000 0.00000 -3.35829 1.06717 -2.58457 1.51876 0.00000 13.5144 -6.47967 4.73586 -5.38880 5.69225 Upper triangular matrix A: 0.754927E-01 0.343269 0.783872 0.371879 0.985218 0.00000 0.107954E-01 0.769384 0.891315 0.794358 0.00000 0.00000 0.726770 0.957193 0.563765E-01 0.00000 0.00000 0.00000 0.378418 0.558277 0.00000 0.00000 0.00000 0.00000 0.218706 The determinant = 4.90197 * 10 ** -5.00000 The inverse matrix: 13.2463 -421.204 431.614 -112.676 1646.54 0.00000 92.6324 -98.0638 29.8649 -387.405 0.00000 0.00000 1.37595 -3.48042 8.52958 0.00000 0.00000 0.00000 2.64258 -6.74557 0.00000 0.00000 0.00000 0.00000 4.57236 DTRSL_TEST DTRSL solves a linear system with a triangular matrix. The matrix size is N = 5 For a lower triangular matrix A, solve A * x = b The solution (should be 1,2,3,4,5): 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 For a lower triangular matrix A, solve A' * x = b The solution (should be 1,2,3,4,5): 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 For an upper triangular matrix A, solve A * x = b The solution (should be 1,2,3,4,5): 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 For an upper triangular matrix A, solve A' * x = b The solution (should be 1,2,3,4,5): 1 1.00000 2 2.00000 3 3.00000 4 4.00000 5 5.00000 LINPACK_D_TEST Normal end of execution. 03 June 2024 9:46:33.671 AM