06 October 2025 6:21:40.103 PM linpack_d_test(): Fortran90 version Test linpack_d(). TEST01 For real ( kind = rk8 ), 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.5920 0.8322 0.4488 0.2171 0.3754 0.8448 0.7355 0.3321 0.8771 0.5649 0.0269 0.2866 0.4095 0.2826 0.9524 0.6612 0.9098 0.9583 0.2897 0.2070 0.7478 0.6839 0.1591 0.7375 Decompose the matrix. Singular values: 1 2.76544 2 0.966738 3 0.604304 4 0.286127 Left Singular Vector Matrix U: -0.4024 0.0389 0.3765 -0.0303 -0.5720 -0.6056 -0.4138 -0.3316 0.4726 -0.3767 -0.0290 0.5938 -0.3527 0.4358 -0.2644 0.4561 -0.4251 0.4766 -0.3654 -0.7396 -0.3497 0.4202 0.0801 -0.1189 -0.4746 0.3525 0.2795 0.2646 0.6917 -0.1548 -0.4285 0.1655 -0.6037 -0.6345 0.0805 -0.1243 Right Singular Vector Matrix V: -0.5803 0.4369 -0.2844 0.6257 -0.6273 0.2485 0.5285 -0.5151 -0.3790 -0.8179 0.2670 0.3408 -0.3550 -0.2801 -0.7540 -0.4764 The product U * S * V' (should equal A): 0.5920 0.8322 0.4488 0.2171 0.3754 0.8448 0.7355 0.3321 0.8771 0.5649 0.0269 0.2866 0.4095 0.2826 0.9524 0.6612 0.9098 0.9583 0.2897 0.2070 0.7478 0.6839 0.1591 0.7375 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.310669 0.00000 0.00000 0.00000 0.00000 0.504352 0.442914 0.00000 0.00000 0.00000 0.538235 0.275745 0.333240 0.00000 0.00000 0.906390 0.490740 0.137769 0.824932 0.00000 0.833237 0.635449 0.376395 0.583727 0.746754 Estimate the condition: The reciprocal condition number = 0.743758E-01 Upper triangular matrix A: 0.378750E-01 0.633203 0.909886 0.187721 0.141630 0.00000 0.540364 0.836899 0.114017 0.845193 0.00000 0.00000 0.913232 0.230284 0.897476 0.00000 0.00000 0.00000 0.802106 0.651023E-01 0.00000 0.00000 0.00000 0.00000 0.413561E-01 Estimate the condition: The reciprocal condition number = 0.768012E-03 DTRDI_TEST DTRDI computes the determinant or inverse of a triangular matrix. The matrix size is N = 5 Lower triangular matrix A: 0.876765 0.00000 0.00000 0.00000 0.00000 0.239236E-01 0.426345 0.00000 0.00000 0.00000 0.707093 0.916153 0.101286 0.00000 0.00000 0.774120 0.443205 0.940083 0.694954 0.00000 0.289896 0.583026 0.361993E-01 0.802858 0.182160 The determinant = 4.79295 * 10 ** -3.00000 The inverse matrix: 1.14056 0.00000 0.00000 0.00000 0.00000 -0.640003E-01 2.34552 0.00000 0.00000 0.00000 -7.38349 -21.2157 9.87302 0.00000 0.00000 8.75818 27.2032 -13.3555 1.43894 0.00000 -38.7442 -123.187 56.9015 -6.34206 5.48969 Upper triangular matrix A: 0.315565 0.792250 0.190751 0.400690 0.972554 0.00000 0.833528 0.958616 0.997279 0.586861 0.00000 0.00000 0.311436E-03 0.836233 0.440942 0.00000 0.00000 0.00000 0.891756 0.145427 0.00000 0.00000 0.00000 0.00000 0.932243 The determinant = 6.81008 * 10 ** -5.00000 The inverse matrix: 3.16892 -3.01199 7330.13 -6871.80 -2396.51 0.00000 1.19972 -3692.80 3461.54 1205.92 0.00000 0.00000 3210.94 -3011.02 -1049.03 0.00000 0.00000 0.00000 1.12138 -0.174932 0.00000 0.00000 0.00000 0.00000 1.07268 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. 06 October 2025 6:21:40.106 PM