Tue May 20 22:02:21 2025 linpack_d_test(): python version: 3.10.12 numpy version: 1.26.4 Test linpack_d(). dgeco_test() dgeco() computes the condition number of a matrix stored in general format. The number of equations is N = 3 The matrix A: [[1. 2. 3.] [4. 5. 6.] [7. 8. 0.]] dgeco() factors and analyzes the matrix The reciprocal condition number RCOND: 0.024644549763033173 dgedet_test() dgedet() computes the determinant of a matrix stored in general format, after it has been factored by dgefa(). The number of equations is N = 3 The matrix A: [[1. 2. 3.] [4. 5. 6.] [7. 8. 0.]] dgefa() factors the matrix dgedet() computes the determinant: The determinant DET: 26.999999999999993 dgefa_test() dgefa() computes pivot vector and LU factors of a matrix stored in general format. The number of equations is N = 3 The matrix A: [[1. 2. 3.] [4. 5. 6.] [7. 8. 0.]] dgefa() factors the matrix The matrix ALU: [[ 7. 8. 0. ] [-0.57142857 0.85714286 3. ] [-0.14285714 -0.5 4.5 ]] The pivot vector IPVT: [2 2 2] dgeinv_test() dgeinv() computes inverse of a matrix stored in general format, which has been factored by dgefa(). The number of equations is N = 3 The matrix A: [[1. 2. 3.] [4. 5. 6.] [7. 8. 0.]] dgefa() factors the matrix dgeinv() computes the inverse matrix The inverse matrix AINV: [[-1.77777778 0.88888889 -0.11111111] [ 1.55555556 -0.77777778 0.22222222] [-0.11111111 0.22222222 -0.11111111]] The product A * AINV: [[ 1.00000000e+00 5.55111512e-17 -4.16333634e-17] [ 5.55111512e-17 1.00000000e+00 -8.32667268e-17] [ 1.77635684e-15 -8.88178420e-16 1.00000000e+00]] dgesl_test() dgesl() solves a linear system involving a matrix stored in general format, after dgefa() has computed the LU factorization; The number of equations is N = 3 The matrix A: [[1. 2. 3.] [4. 5. 6.] [7. 8. 0.]] dgefa() factors the matrix The right hand side B [14. 32. 23.] dgesl() solves the linear system. Computed solution X (should be (1,2,3)) [1. 2. 3.] dgeslt_test(): dgeslt() solves a transposed linear system involving a matrix stored in general format, after dgefa() has computed the LU factorization; The number of equations is N = 3 The matrix A: [[1. 2. 3.] [4. 5. 6.] [7. 8. 0.]] dgefa() factors the matrix The right hand side B [30. 36. 15.] dgeslt() solves the linear system. Computed solution X (should be (1,2,3)) [1. 2. 3.] dpofa_test(): dpofa() computes the LU factors of a positive definite symmetric matrix, Matrix A: [[ 2. -1. 0. 0. 0.] [-1. 2. -1. 0. 0.] [ 0. -1. 2. -1. 0.] [ 0. 0. -1. 2. -1.] [ 0. 0. 0. -1. 2.]] Call DPOFA to factor the matrix. Upper triangular factor U: [[ 1.41421356 -0.70710678 0. 0. 0. ] [ 0. 1.22474487 -0.81649658 0. 0. ] [ 0. 0. 1.15470054 -0.8660254 0. ] [ 0. 0. 0. 1.11803399 -0.89442719] [ 0. 0. 0. 0. 1.09544512]] Product Ut * U: [[ 2. -1. 0. 0. 0.] [-1. 2. -1. 0. 0.] [ 0. -1. 2. -1. 0.] [ 0. 0. -1. 2. -1.] [ 0. 0. 0. -1. 2.]] 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. 1. 0.] [1. 0. 1.] [0. 1. 1.]] Decompose the matrix. The packed matrix A which describes Q and R: [[-1.41421356 -0.70710678 -0.70710678] [ 0.70710678 1.22474487 0.40824829] [ 0. -0.81649658 1.15470054]] The QRAUX vector, containing some additional information defining Q: [1.70710678 1.57735027 0. ] The R factor: [[-1.41421356 -0.70710678 -0.70710678] [ 0. 1.22474487 0.40824829] [ 0. 0. 1.15470054]] The Q factor: [[-0.70710678 0.40824829 -0.57735027] [-0.70710678 -0.40824829 0.57735027] [ 0. 0.81649658 0.57735027]] The product Q * R: [[ 1.00000000e+00 1.00000000e+00 -8.79548322e-17] [ 1.00000000e+00 -6.78135690e-17 1.00000000e+00] [ 0.00000000e+00 1.00000000e+00 1.00000000e+00]] 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. 1. 1.] [ 1. 2. 4.] [ 1. 3. 9.] [ 1. 4. 16.] [ 1. 5. 25.]] Decompose the matrix. X X(expected): -3.02 -3.02 4.49143 4.49143 -0.728571 -0.728571 drotg_test(): drotg() generates a real Givens rotation ( C S ) * ( A ) = ( R ) ( -S C ) ( B ) ( 0 ) A = 0.206857 B = 0.943906 C = 0.21407 S = 0.976818 R = 0.966306 Z = 4.67137 C*A+S*B = 0.966306 -S*A+C*B = 0 A = 0.330015 B = 0.284414 C = 0.757503 S = 0.652832 R = 0.435661 Z = 0.652832 C*A+S*B = 0.435661 -S*A+C*B = -2.77556e-17 A = 0.773573 B = 0.276054 C = 0.941828 S = 0.336096 R = 0.821353 Z = 0.336096 C*A+S*B = 0.821353 -S*A+C*B = 0 A = 0.629743 B = 0.453197 C = 0.811667 S = 0.58412 R = 0.775863 Z = 0.58412 C*A+S*B = 0.775863 -S*A+C*B = 0 A = 0.0566944 B = 0.761157 C = 0.0742788 S = 0.997238 R = 0.763266 Z = 13.4628 C*A+S*B = 0.763266 -S*A+C*B = 6.93889e-18 dsvdc_test(): dsvdc() computes the singular value decomposition for an MxN matrix A in general storage. A = U * S * V' Matrix rows M = 6 Matrix columns N = 4 The matrix A: [[0.85973345 0.7856968 0.49859021 0.50297174] [0.89852353 0.0701622 0.08741342 0.95051254] [0.42839749 0.52859437 0.86162489 0.6975803 ] [0.25213313 0.90197047 0.58479096 0.50980309] [0.01221007 0.88690969 0.69136693 0.75375115] [0.41945221 0.70396177 0.89805449 0.35485109]] Decompose the matrix. Singular values: [2.91867337 1.09238662 0.54673939 0.42224831 0. 0. 0. ] Left singular vectors U: [[-0.44247335 -0.21416209 0.60006443 -0.39530821 0.15857173 -0.46568341] [-0.31570231 -0.84180681 -0.30996074 0.00316111 0.05601418 0.30408899] [-0.43523866 0.02369864 -0.14381952 0.63276559 -0.41854146 -0.46233362] [-0.40076432 0.25272238 -0.0198793 -0.4396963 -0.65626096 0.38873241] [-0.42808055 0.35565253 -0.60682618 -0.24615383 0.48394311 -0.1650081 ] [-0.41382569 0.23361711 0.39310274 0.43520637 0.36285131 0.546421 ]] Right singular vectors V: [[-0.38729349 -0.6996604 0.60036412 0.00648091] [-0.5592708 0.45133727 0.1724729 -0.67362003] [-0.52256072 0.40602113 0.12809749 0.73869355] [-0.51395546 -0.37671851 -0.77032919 -0.02293241]] Product U * S * V should equal A: [[0.85973345 0.7856968 0.49859021 0.50297174] [0.89852353 0.0701622 0.08741342 0.95051254] [0.42839749 0.52859437 0.86162489 0.6975803 ] [0.25213313 0.90197047 0.58479096 0.50980309] [0.01221007 0.88690969 0.69136693 0.75375115] [0.41945221 0.70396177 0.89805449 0.35485109]] linpack_d_test(): Normal end of execution. Tue May 20 22:02:22 2025