14-Oct-2022 10:45:08 test_matrix_test() MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 test_matrix() defines a number of test matrices with known properties. bvec_next_grlex_test(): bvec_next_grlex() computes binary vectors in GRLEX order. 0: 0000 1: 0001 2: 0010 3: 0100 4: 1000 5: 0011 6: 0101 7: 0110 8: 1001 9: 1010 10: 1100 11: 0111 12: 1011 13: 1101 14: 1110 15: 1111 16: 0000 legendre_zeros_test(): legendre_zeros() computes the zeros of the N-th Legendre polynomial. Legendre zeros 1: 0 Legendre zeros 1: -0.57735 2: 0.57735 Legendre zeros 1: -0.774597 2: 0 3: 0.774597 Legendre zeros 1: -0.861136 2: -0.339981 3: 0.339981 4: 0.861136 Legendre zeros 1: -0.90618 2: -0.538469 3: 0 4: 0.538469 5: 0.90618 Legendre zeros 1: -0.93247 2: -0.661209 3: -0.238619 4: 0.238619 5: 0.661209 6: 0.93247 Legendre zeros 1: -0.949108 2: -0.741531 3: -0.405845 4: 0 5: 0.405845 6: 0.741531 7: 0.949108 mertens_test(): mertens() computes the Mertens function. N Exact MERTENS(N) 1 1 1 2 0 0 3 -1 -1 4 -1 -1 5 -2 -2 6 -1 -1 7 -2 -2 8 -2 -2 9 -2 -2 10 -1 -1 11 -2 -2 12 -2 -2 100 1 1 1000 2 2 moebius_test(): moebius() computes the Moebius function. N Exact MOEBIUS(N) 1 1 1 2 -1 -1 3 -1 -1 4 0 0 5 -1 -1 6 1 1 7 -1 -1 8 0 0 9 0 0 10 1 1 11 -1 -1 12 0 0 13 -1 -1 14 1 1 15 1 1 16 0 0 17 -1 -1 18 0 0 19 -1 -1 20 0 0 r8mat_is_eigen_left_test(): R8MAT_IS_EIGEN_LEFT tests the error in the left eigensystem A' * X - X * LAMBDA = 0 Matrix A: Col: 1 2 3 4 Row 1 : 0.136719 0.605469 0.253906 0.00390625 2 : 0.0585938 0.527344 0.394531 0.0195312 3 : 0.0195312 0.394531 0.527344 0.0585938 4 : 0.00390625 0.253906 0.605469 0.136719 Eigenmatrix X: Col: 1 2 3 4 Row 1 : 1 1 1 1 2 : 11 3 -1 -3 3 : 11 -3 -1 3 4 : 1 -1 1 -1 Eigenvalues LAM: 1: 1 2: 0.25 3: 0.0625 4: 0.015625 Frobenius norm of A'*X-X*LAMBDA is 9.40908 r8mat_is_eigen_left_test(): Normal end of execution. r8mat_is_eigen_right_test(): r8mat_is_eigen_right() tests the error in the right eigensystem A * X - X * LAMBDA = 0 Matrix A: Col: 1 2 3 4 Row 1 : 0.136719 0.605469 0.253906 0.00390625 2 : 0.0585938 0.527344 0.394531 0.0195312 3 : 0.0195312 0.394531 0.527344 0.0585938 4 : 0.00390625 0.253906 0.605469 0.136719 Eigenmatrix X: Col: 1 2 3 4 Row 1 : 1 6 11 6 2 : 1 2 -1 -2 3 : 1 -2 -1 2 4 : 1 -6 11 -6 Eigenvalues LAM: 1: 1 2: 0.25 3: 0.0625 4: 0.015625 Frobenius norm of A*X-X*LAMBDA is 0 r8mat_is_eigen_right_test(): Normal end of execution. r8mat_is_ldlt_test(): r8mat_is_ldlt() tests the error in an LDLT factorization by looking at A - L * D * L' Matrix A: Col: 1 2 3 4 Row 1 : 1 4 16 64 2 : 4 1 4 16 3 : 16 4 1 4 4 : 64 16 4 1 Factor L: Col: 1 2 3 4 Row 1 : 1 0 0 0 2 : 4 1 0 0 3 : 16 4 1 0 4 : 64 16 4 1 Factor D: Col: 1 2 3 4 Row 1 : 1 0 0 0 2 : 0 -15 0 0 3 : 0 0 -15 0 4 : 0 0 0 -15 Frobenius norm of A-L*D*L' is 0 r8mat_is_ldlt_test(): Normal end of execution. r8mat_is_llt_test(): r8mat_is_llt() tests the error in a lower triangular Cholesky factorization A = L * L' by looking at A - L * L' Matrix A: Col: 1 2 3 4 Row 1 : 2 1 0 0 2 : 1 2 1 0 3 : 0 1 2 1 4 : 0 0 1 2 Factor L: Col: 1 2 3 4 Row 1 : 1.41421 0 0 0 2 : 0.707107 1.22474 0 0 3 : 0 0.816497 1.1547 0 4 : 0 0 0.866025 1.11803 Frobenius norm of A-L*L' is 2.18689e-15 r8mat_is_null_left_test(): r8mat_is_null_left() tests whether the M vector X is a left null vector of A, that is, x'*A=0. Matrix A: Col: 1 2 3 Row 1 : 1 2 3 2 : 4 5 6 3 : 7 8 9 Vector X: 1: 1 2: -2 3: 1 Frobenius norm of X'*A is 0 r8mat_is_null_right_test(): r8mat_is_null_right() tests whether the N vector X is a right null vector of A, that is, A*x=0. Matrix A: Col: 1 2 3 Row 1 : 1 2 3 2 : 4 5 6 3 : 7 8 9 Vector X: 1: 1 2: -2 3: 1 Frobenius norm of A*x is 0 r8mat_is_solution_test(): r8mat_is_solution() tests whether X is the solution of A*X=B by computing the Frobenius norm of the residual. A is 9 by 10 X is 10 by 2 B is 9 by 2 Frobenius error in A*X-B is 0 test_condition(): For each example matrix, compute the L1 condition number, COND1 as returned by test_matrix() COND2 as computed by norm(A,1)*norm(Ainverse,1) COND3 as computed by MATLAB cond(A,1). Title N COND1 COND2 COND3 aegerter 5 24 24 24 antisummation 5 80 80 80 bab 5 79.0448 79.0448 79.0448 bauer 6 8.52877e+06 8.52877e+06 8.52877e+06 bernstein 5 160 160 160 bis 5 11.0411 11.0411 11.0411 biw 5 59.9171 59.9171 59.9171 bodewig 3 10.4366 10.4366 10.4366 boothroyd 5 1.002e+06 1.002e+06 1.002e+06 combin 3 5.15881 5.15881 5.15881 companion 5 19.4797 19.4797 19.4797 conex1 4 24.2743 24.2743 24.2743 conex2 3 138.994 138.994 138.994 conex3 5 80 80 80 conex4 4 4488 4488 4488 daub2 4 2 2 2 daub4 8 2.79904 2.79904 2.79904 daub6 12 3.44146 3.44146 3.44146 daub8 16 3.47989 3.47989 3.47989 daub10 20 4.00375 4.00375 4.00375 daub12 24 4.80309 4.80309 4.80309 defective 2 4 4 4 diagonal 5 4.98112 4.98112 4.98112 dif2 5 18 18 18 downshift 5 1 1 1 exchange 5 1 1 1 fibonacci2 5 15 15 15 fibonacci3 5 4.5 4.5 4.5 frank 5 891 891 891 gfpp 5 11.9432 11.9432 11.9432 givens 5 50 50 50 golub 5 1.02587e+08 1.02587e+08 1.02587e+08 hankel_n 5 5.8368 5.8368 5.8368 hanowa 6 3.97022 3.97022 3.97022 harman 8 77.069 77.069 77.069 hartley 5 5 5 5 helmert 5 4.63951 4.63951 4.63951 herndon 5 24 24 24 hilbert 5 943656 943656 943656 identity 5 1 1 1 ill3 3 216775 216775 216775 involutory 5 1.14582e+07 1.14582e+07 1.14582e+07 jordan 5 516.34 516.34 516.34 kershaw 4 49 49 49 kahan 5 6.14037 6.14037 6.14037 kms 5 93 93 93 lehmer 5 26.8 26.8 26.8 lietzke 5 38 38 38 maxij 5 100 100 100 minij 5 60 60 60 moler3 5 1539 1539 1539 moler4 4 9 9 9 orthogonal_symmetric 5 4.39765 4.39765 4.39765 oto 5 18 18 18 pascal1 5 100 100 100 pascal3 5 1.85826e+06 1.85826e+06 1.85826e+06 pei 5 2.38038 2.38038 2.38038 permutation_random 5 1 1 1 rodman 5 8.66823 8.66823 8.66823 rutis1 4 15 15 15 rutis2 4 11.44 11.44 11.44 rutis3 4 6 6 6 rutis4 5 4006.75 4006.75 4006.75 rutis5 4 62608 62608 62608 summation 5 10 10 10 sweet1 6 16.9669 16.9669 16.9669 sweet2 6 49.2227 49.2227 49.2227 sweet3 6 24.7785 24.7785 24.7785 sweet4 13 51.1709 51.1709 51.1709 tri_upper 5 4.15582 4.15582 4.15582 upshift 5 1 1 1 wilk03 3 2.6e+10 2.6e+10 2.6e+10 [Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 4.066877e-17.] [> In cond (line 46) In test_condition (line 1048) In test_matrix_test (line 44) In run (line 91) ] wilk04 4 2.45892e+16 2.45889e+16 2.45889e+16 wilk05 5 7.93703e+06 7.93703e+06 7.93703e+06 wilson 4 4488 4488 4488 test_determinant(): For each example matrix A that is square: Determ = determinant from routine, if available. det(A) = determinant from MATLAB builtin function; Print the matrix Frobenius norm for an estimate of magnitude. Title N Determ det(A) |A| a123 3 0 -9.5162e-16 17 aegerter 5 -25 -25 9.4 anticirculant 3 -0.0439243 -0.0439243 0.84 anticirculant 4 19.4973 19.4973 4.4 anticirculant 5 4523.34 4523.34 14 antihadamard 5 1 1 3.3 antisummation 5 1 1 3.9 antisymmetric_random 4 0.0131962 0.0131962 1.7 antisymmetric_random 5 0 -1.54871e-18 4.1 antisymmetric_random 6 6.25008 6.25008 5.2 bab 5 0.000693053 0.000693053 1.2 bauer 6 1 1 1.9e+02 bernstein 5 96 96 25 bimarkov_random 5 0.000865656 1.6 bis 5 0.00381553 0.00381553 1 biw 5 0.0547223 0.0547223 2.4 bodewig 4 568 568 13 boothroyd 5 1 1 8.9e+02 borderband 5 -0.328125 -0.328125 2.8 carry 5 1.61506e-11 1.61506e-11 1.4 cauchy 5 1.55945e-06 1.55945e-06 11 cheby_diff1 5 -2.8387e-14 13 cheby_diff1 6 -3.94228e-13 21 cheby_t 5 64 64 13 cheby_u 5 1024 1024 22 cheby_van1 5 18 4.3 cheby_van2 2 -2 -2 2 cheby_van2 3 -1.41421 -1.41421 2 cheby_van2 4 1 1 2.1 cheby_van2 5 0.707107 0.707107 2.2 cheby_van2 6 -0.5 -0.5 2.3 cheby_van2 7 -0.353553 -0.353553 2.4 cheby_van2 8 0.25 0.25 2.5 cheby_van2 9 0.176777 0.176777 2.6 cheby_van2 10 -0.125 -0.125 2.7 cheby_van3 5 13.9754 13.9754 3.9 chow 5 0.0567824 0.0567824 2.5 circulant 5 62.0625 62.0625 7.3 circulant2 3 18 18 6.5 circulant2 4 -160 -160 11 circulant2 5 1875 1875 17 clement1 5 0 0 6.3 clement1 6 -225 -225 8.4 clement2 5 0 0 6.6 clement2 6 -0.953425 -0.953425 7 combin 5 0.0236506 -0.953425 7 companion 5 0.32833 0.32833 3.8 complex_i 2 1 1 1.4 conex1 4 0.32833 0.32833 2.9 conex2 3 3.04571 3.04571 9.6 conex3 5 -1 -1 3.9 conex4 4 -1 -1 31 conference 6 -125 -125 5.5 creation 5 0 0 5.5 daub2 4 1 1 2 daub4 8 -1 -1 2.8 daub6 12 1 1 3.5 daub8 16 -1 -1 4 daub10 20 1 1 4.5 daub12 24 -1 -1 4.9 defective 2 1 1 1.7 diagonal 5 -0.055566 -0.055566 3.3 dif1 6 1 1 3.2 dif1 7 0 0 3.5 dif1 8 1 1 3.7 dif1cyclic 6 0 0 3.5 dif2 5 6 6 5.3 dif2cyclic 5 0 0 5.5 dorr 5 1.54702e+06 1.54702e+06 66 downshift 5 1 1 2.2 drmac_bad 3 9.72e+59 9.72e+59 1e+40 drmac_good 3 0.972 0.972 1.7 eberlein 5 0 0 26 eulerian 5 1 1 77 exchange 5 1 1 2.2 fibonacci1 5 0 2.52334e-50 18 fibonacci2 5 -1 -1 3 fibonacci3 5 8 8 3.6 fiedler 7 -1.41608 1.41608 19 forsythe 5 0.332966 0.332966 2.2 forsythe 6 -0.326748 -0.326748 2.4 fourier_cosine 5 1 1 2.2 fourier_sine 5 1 1 2.2 frank 5 1 1 12 gfpp 5 3.11332 3.11332 3.2 givens 5 16 16 21 gk323 5 32 32 10 gk324 5 -0.454396 -0.454396 4.5 golub 5 1 1 5e+02 grcar 5 15 4.2 hadamard 5 0 4 hankel 5 308.847 12 hankel_n 5 3125 3125 15 hanowa 6 41.4462 41.4462 5.4 harman 8 0.000954779 0.000954779 5.1 hartley 5 55.9017 55.9017 5 hartley 6 -216 -216 6 hartley 7 -907.493 -907.493 7 hartley 8 -4096 -4096 8 helmert 5 1 1 2.2 helmert2 5 1 2.2 hermite 5 1024 1024 54 herndon 5 -0.04 -0.04 1.8 hilbert 5 3.7493e-12 3.7493e-12 1.6 householder 5 -1 1 2.2 idempotent_random 5 0 -5.07668e-34 1.7 identity 5 1 1 2.2 ijfact1 5 7.16636e+09 7.16636e+09 3.7e+06 ijfact2 5 1.4948e-21 1.4948e-21 0.56 ill3 3 6 6 8.2e+02 integration 6 1 1 2.5 involutory 5 -1 -1 1.9e+03 involutory_random 5 -1 2.2 jacobi 5 0 0 1.5 jacobi 6 -0.021645 -0.021645 1.7 jordan 6 0.00125275 0.00125275 2.4 kahan 5 4.23835e-08 4.23835e-08 0.72 kershaw 4 1 1 8.2 kershawtri 5 0.658378 0.658378 2.9 kms 5 0.633647 0.633647 2.4 laguerre 5 0.00347222 0.00347222 6.9 legendre 5 16.4062 16.4062 6.8 lehmer 5 0.065625 0.065625 3.3 leslie 4 0.605244 0.605244 1.8 lesp 5 -42300 -42300 22 lietzke 5 48 48 18 lights_out 25 0 10 line_adj 5 0 0 2.8 line_adj 6 -1 -1 3.2 line_loop_adj 5 0 -0 3.6 loewner 5 3.53081 72 lotkin 5 1.87465e-11 1.87465e-11 2.5 markov_random 5 -0.00080108 1.1 maxij 5 5 5 20 milnes 5 -0.454396 -0.454396 4.5 minij 5 1 1 12 moler1 5 1 1 3.4 moler2 5 0 1.15439e-12 1e+05 moler3 5 1 1 8.7 moler4 4 1 1 2.8 neumann 25 0 0.000830873 23 one 5 0 0 5 ortega 5 353.684 353.684 53 orthogonal_random 5 1 -1 2.2 orthogonal_symmetric 5 1 1 2.2 oto 5 6 6 5.3 parter 5 131.917 131.917 6.3 pascal1 5 1 1 9.9 pascal2 5 1 1 92 pascal3 5 1 1 3 pei 5 0.0619205 0.0619205 5.4 permutation_random 5 1 1 2.2 plu 5 1.93261e+07 1.93261e+07 1.5e+02 poisson 25 3.25655e+13 3.25655e+13 22 projection_random 5 1 1 2.2 projection_random 5 0 -5.59507e-35 1.7 prolate 5 0.100127 1.5 q 11 -0 2.4e+03 rectangle_adj 25 0 0 8.9 redheffer 5 -2 -2 3.7 ref_random 5 1 1 2.9 riemann 5 96 8.8 ring_adj 1 1 1 1 ring_adj 2 -1 -1 1.4 ring_adj 3 2 2 2.4 ring_adj 4 0 -0 2.8 ring_adj 5 2 2 3.2 ring_adj 6 -4 -4 3.5 ring_adj 7 2 2 3.7 ring_adj 8 0 -0 4 ris 5 4.12239 4.12239 3.2 rodman 5 0.470825 0.470825 2.7 rosser1 8 0 -10611.3 2.5e+03 routh 5 -0.0762185 0.0762185 3.2 rutis1 4 -375 -375 17 rutis2 4 100 100 11 rutis3 4 624 624 14 rutis4 5 216 216 59 rutis5 4 1 1 24 schur_block 5 2.68563 2.68563 4.6 skew_circulant 5 -248.275 -248.275 7.3 smith 8 768 768 18 spd_random 5 0.0265948 0.0444632 1.5 spline 5 8.63749 8.63749 7.1 stirling 5 1 1 68 stripe 5 2112 15 summation 5 1 1 3.9 sweet1 6 -2.04682e+07 -2.04682e+07 70 sweet2 6 9562.52 9562.52 30 sweet3 6 -5.40561e+07 -5.40561e+07 73 sweet4 13 -6.46348e+16 -6.46348e+16 1.2e+02 sylvester 5 -172.011 9.5 sylvester_kac 5 0 0 7.7 sylvester_kac 6 -225 -225 10 symmetric_random 5 -0.055566 -0.055566 3.3 toeplitz 5 308.847 12 toeplitz_5diag 5 -2.32155 6.1 toeplitz_5s 25 4.34487e-14 2.9 toeplitz_spd 5 0.330235 4 tournament_random 8 81 81 7.5 tournament_random 9 0 9.44245e-14 8.5 tournament_random 10 441 441 9.5 transition_random 5 -0.000877481 1.2 trench 5 -0.471621 3.2 tri_upper 5 1 1 2.5 tris 5 0.00065222 0.00065222 1 triv 5 301.178 301.178 8.4 triw 5 1 1 2.4 unitary_random 5 1 1 2.2 upshift 5 1 1 2.2 vand1 5 0.43505 0.43505 45 vand2 5 0.43505 0.43505 45 wathen 96 7.49648e+292 3e+04 wilk03 3 9e-21 9e-21 1.4 wilk04 4 4.42923e-17 4.42923e-17 1.9 wilk05 5 3.7995e-15 3.79947e-15 1.5 wilk20 20 -1.72139e+24 1e+02 wilk21 21 -4.15825e+12 -4.15825e+12 28 wilson 4 1 1 31 zero 5 0 0 0 zielke 5 -0.000592792 2.5 test_eigen_left(): Compute the Frobenius norm of the left eigensystem error: X*A * LAMBDA*X given K left eigenvectors X and eigenvalues LAMBDA. Title N K |A| |X*A-Lambda*X| a123 3 3 16.8819 1.23246e-14 carry 5 5 1.40933 1.42231e-14 chow 5 5 2.50858 1.37252e-16 diagonal 5 5 3.27099 0 rosser1 8 8 2482.26 2.61006e-11 symmetric_random 5 5 3.27099 1.97322e-15 test_eigen_right(): Compute the Frobenius norm of the right eigensystem error: A * X - X * LAMBDA given K right eigenvectors X and eigenvalues LAMBDA. Title N K |A| |A*X-X*Lambda| a123 3 3 16.8819 1.33427e-14 bab 5 5 1.21295 3.37022e-16 bodewig 4 4 12.7279 9.17346e-15 carry 5 5 1.40933 8.90533e-16 chow 5 5 2.50858 2.36356e-16 combin 5 5 2.13848 0 defective 2 1 1.73205 0 dif2 5 5 5.2915 1.08775e-15 drmac_good 3 3 1.74929 0.0173205 exchange 5 5 2.23607 0 fibonacci2 5 5 3 1.46869e-16 idempotent_random 5 5 1.73205 1.06001e-15 identity 5 5 2.23607 0 ill3 3 3 817.763 1.62356e-11 kershaw 4 4 8.24621 4.80549e-15 kms 5 5 2.80347 1.29305e-09 line_adj 5 5 2.82843 8.70745e-16 line_loop_adj 5 5 3.60555 9.79512e-16 magic 5 1 74.3303 0 one 5 5 5 0 ortega 5 5 53.3715 5.11623e-14 oto 5 5 5.2915 1.08775e-15 pei 5 5 5.36864 0 reflection_random 5 5 2.23607 6.10034e-16 rodman 5 5 2.67507 0 rosser1 8 8 2482.26 2.58463e-11 rutis1 4 4 16.6132 0 rutis2 4 4 11.4018 0 rutis3 4 4 14.1421 0 rutis4 5 5 59.127 2.18012e-14 rutis5 4 4 23.7697 1.46286e-14 spd_random 5 5 1.29874 0.912583 sylvester_kac 5 5 7.74597 0 symmetric_random 5 5 3.27099 1.97939e-15 tribonacci2 5 5 3.31662 1.58231e-16 wilson 4 4 30.545 2.48731e-14 zero 5 5 0 0 test_inverse(): A = a test matrix; B = inverse as returned by test_matrix(). C = inverse as computed by Matlab's inv() function. |A| = Frobenius norm of A. |C| = Frobenius norm of C. |I-AC| = Frobenius norm of I-A*C. |I-AB| = Frobenius norm of I-A*B. Title N |A| |C| |I-AC| |I-AB| aegerter 5 9.4 1.8 8.43696e-16 7.1089e-16 anticirculant 5 7.3 2.2 2.51889e-15 1.73947e-15 antisummation 5 3.9 11 0 0 bab 5 1.2 77 9.97651e-15 5.93802e-15 bauer 6 1.9e+02 2.1e+04 7.61015e-11 0 bernstein 5 25 3.2 0 0 bis 5 1 12 6.28037e-16 9.93014e-16 biw 5 2.4 26 3.93126e-15 1.01754e-15 bodewig 4 13 0.68 8.09356e-16 7.08784e-16 boothroyd 5 8.9e+02 8.9e+02 3.69857e-11 0 borderband 5 2.8 6.8 0 0 carry 5 1.4 5.1e+04 3.26918e-12 2.05862e-12 cauchy 5 11 7.1e+04 1.43571e-11 5.26739e-11 cheby_t 5 13 1.9 0 0 cheby_u 5 22 1.2 0 0 cheby_van2 5 2.2 2.5 5.36049e-16 5.91396e-16 cheby_van3 5 3.9 1.3 7.84179e-16 7.91134e-16 chow 5 2.5 28 3.07925e-15 2.23377e-15 circulant 5 7.3 2.2 1.92194e-15 1.64294e-15 circulant2 5 17 0.64 9.37718e-16 1.79993e-15 clement1 6 8.4 1.5 1.26959e-16 1.26959e-16 clement2 6 7 1.5e+02 9.11478e-15 1.14732e-14 combin 5 2.1 6.1 8.75951e-16 7.96735e-16 companion 5 3.8 11 3.73154e-16 1.31452e-15 complex_i 2 1.4 1.4 0 0 conex1 4 2.9 5.3 0 0 conex2 3 9.6 11 0 0 conex3 5 3.9 11 0 0 conference 6 5.5 1.1 1.27071e-15 0 daub2 4 2 2 0 8.88178e-16 daub4 8 2.8 2.8 3.41358e-16 1.93305e-15 daub6 12 3.5 3.5 1.12828e-15 1.03868e-15 daub8 16 4 4 1.35804e-15 4.66496e-15 daub10 20 4.5 4.5 1.59942e-15 8.70144e-15 daub12 24 4.9 4.9 2.05777e-15 1.96031e-14 defective 2 1.7 1.7 0 0 diagonal 5 3.3 11 2.22045e-16 2.22045e-16 dif1 6 3.2 3.5 0 0 dif2 5 5.3 3.9 1.16573e-15 6.86635e-16 dorr 5 66 0.36 2.33477e-15 1.56652e-15 downshift 5 2.2 2.2 0 0 [Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 9.818182e-41.] [> In test_inverse (line 691) In test_matrix_test (line 48) In run (line 91) ] drmac_bad 3 1e+40 1 5.06639e-07 8192 drmac_good 3 1.7 1.8 4.00116e-17 6.7987e-17 eulerian 5 77 7.8e+02 7.90266e-13 0 exchange 5 2.2 2.2 0 0 fibonacci2 5 3 3.5 0 0 fibonacci3 5 3.6 1.6 1.57009e-16 0 fiedler 7 19 78 7.95458e-14 5.99243e-14 forsythe 5 2.2 4 7.86901e-16 4.48132e-14 fourier_cosine 5 2.2 2.2 9.66204e-16 1.05758e-15 fourier_sine 5 2.2 2.2 8.45976e-16 1.74662e-15 frank 5 12 59 8.00073e-15 0 gfpp 5 3.2 2 5.41388e-16 5.95578e-16 givens 5 21 2.7 0 0 gk323 5 10 2.3 0 0 gk324 5 4.5 4.3 1.05778e-15 8.77682e-16 golub 5 5e+02 2.1e+05 7.19249e-10 1.17467e-09 hankel 5 14 0.58 7.48476e-16 1.04288e-15 hankel_n 6 21 0.51 3.32551e-16 1.24127e-16 hanowa 6 5.4 1.6 4.64202e-17 4.38595e-19 harman 8 5.1 15 3.49319e-15 1.05077e-14 hartley 5 5 1 7.75823e-16 2.64491e-15 helmert 5 2.2 2.2 4.60503e-16 8.20249e-16 helmert2 5 2.2 2.2 3.5804e-16 4.59359e-16 hermite 5 54 1.8 2.0017e-15 0 herndon 5 1.8 9.4 8.82959e-16 7.1089e-16 hilbert 5 1.6 3e+05 1.62896e-11 7.27596e-12 householder 5 2.2 2.2 0 0 identity 5 2.2 2.2 0 0 ill3 3 8.2e+02 3.4e+02 1.6933e-11 0 integration 6 2.5 2.5 0 2.71051e-20 involutory 5 1.9e+03 1.9e+03 7.97062e-11 7.27596e-12 jacobi 6 1.7 6.5 6.62376e-16 2.00255e-16 jordan 5 2.1 2.9e+02 0 0 kahan 5 0.72 2.4e+03 7.40771e-14 4.82874e-14 kershaw 4 8.2 8.2 5.40714e-15 0 kershawtri 5 2.9 4.4 8.72426e-16 7.19507e-16 kms 5 2.4 2.9 5.00393e-16 2.45939e-17 laguerre 5 6.9 2e+02 1.98582e-14 0 legendre 5 6.8 1.9 2.64566e-16 2.68032e-16 lehmer 5 3.3 7.7 1.76508e-15 1.41744e-15 lesp 5 22 0.32 4.2283e-16 7.59974e-16 lietzke 5 18 2.4 3.1288e-15 6.95553e-16 line_adj 6 3.2 3.5 0 0 lotkin 5 2.5 2.4e+05 2.42816e-11 0 maxij 5 20 4.7 3.22347e-15 0 milnes 5 4.5 4.3 1.05778e-15 9.42883e-16 minij 5 12 5 0 0 moler1 5 3.4 2.7 3.747e-16 3.46945e-16 moler3 5 8.7 1.2e+02 0 0 ortega 5 53 5.6 5.05798e-14 4.21167e-14 orthogonal_random 5 2.2 2.2 4.60709e-16 2.49746e-15 orthogonal_symmetric 5 2.2 2.2 2.10325e-15 2.09807e-15 oto 5 5.3 3.9 1.16573e-15 6.86635e-16 parter 5 6.3 0.94 7.94358e-16 6.96142e-17 pascal1 5 9.9 9.9 0 0 pascal2 5 92 92 2.55197e-13 0 pascal3 5 3 3 3.46945e-18 0 pei 5 5.4 6.1 3.24063e-15 1.81751e-15 permutation_random 5 2.2 2.2 0 0 plu 5 1.5e+02 0.14 1.22477e-15 1.17406e-15 ris 5 3.2 1.9 9.86926e-16 8.37173e-17 rodman 5 2.7 3 5.33889e-16 1.71097e-16 rutis1 4 17 1 2.10357e-15 1.05471e-15 rutis2 4 11 1.1 3.41066e-16 6.83824e-16 rutis3 4 14 0.58 7.65703e-16 6.0166e-16 rutis4 4 51 18 7.35045e-14 9.12408e-14 rutis5 4 24 1.9e+03 3.77271e-12 0 schur_block 5 4.6 11 7.85046e-17 6.32925e-16 spd_random 5 1.5 7 9.41421e-16 3.89584 spline 5 7.1 2.6 9.00417e-16 1.37268e-15 stirling 5 68 32 2.8346e-14 0 summation 5 3.9 3 0 0 sweet1 6 70 0.26 2.73087e-15 1.08396e-13 sweet2 6 30 1.4 3.39764e-15 3.43638e-14 sweet3 6 73 0.34 1.12351e-15 1.43359e-13 sweet4 13 1.2e+02 0.38 3.51723e-15 2.5691e-13 sylvester_kac 6 10 2.5 2.83052e-16 1.42195e-16 symmetric_random 5 3.3 11 2.18051e-15 1.18866e-14 toeplitz 5 12 2 1.69258e-15 3.6394e-15 tri_upper 5 2.5 2.4 0 1.38778e-17 tris 5 1 53 4.3995e-15 5.02732e-15 triv 5 8.4 0.88 8.61231e-16 6.15329e-16 triw 5 2.4 2.4 2.13609e-17 1.96262e-17 unitary_random 5 2.2 2.2 6.09071e-16 1.21699e-15 upshift 5 2.2 2.2 0 0 vand1 5 45 5.3e+02 2.91599e-13 7.13883e-13 vand2 5 45 5.3e+02 5.33183e-13 7.13883e-13 wilk03 3 1.4 1.8e+10 8.96394e-07 6.7435e-07 [Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 4.066877e-17.] [> In test_inverse (line 2090) In test_matrix_test (line 48) In run (line 91) ] wilk04 4 1.9 1.2e+16 0.000440066 10.7174 wilk05 5 1.5 3.1e+06 2.99475e-10 1.2274e-09 wilk21 21 28 4.3 1.50257e-15 3.84544e-15 wilson 4 31 99 1.81049e-13 0 test_ldlt(): A = a symmetric M x M test matrix L is an M by M lower triangular matrix. D is an M by M diagonal matrix. |A| = Frobenius norm of A. |A-LDLT| = Frobenius norm of A-L*D*L'. Title M N |A| |A-LDLT| aegerter 5 5 9.43398 0 bodewig 4 4 12.7279 6.28037e-16 kms 4 4 14.8324 0 test_llt(): A = a test matrix of order M by M L is an M by N lower triangular Cholesky factor. |A| = Frobenius norm of A. |A-LLT| = Frobenius norm of A-L*L'. Title M N |A| |A-LLT| dif2 5 5 5.2915 8.00593e-16 givens 5 5 20.6155 4.23634e-15 hilbert 5 5 1.58091 3.92523e-17 kershaw 4 4 8.24621 2.57035e-15 lehmer 5 5 3.28041 1.35974e-16 minij 5 5 12.4499 0 moler1 5 5 3.39724 0 moler3 5 5 8.66025 0 oto 5 5 5.2915 6.28037e-16 pascal2 5 5 92.4608 0 wilk05 5 5 1.51485 1.35406e-15 wilson 4 4 30.545 5.25453e-15 test_lu(): A = a test matrix of order M by N L, U are the LU factors. |A| = Frobenius norm of A. |A-LU| = Frobenius norm of A-L*U. Title M N |A| |A-LU| bodewig 4 4 12.7279 1.83103e-15 borderband 5 5 2.76699 0 dif2 5 5 5.2915 0 fibonacci2 5 5 3 0 gfpp 5 5 4.3589 0 givens 5 5 20.6155 0 golub 5 5 500.265 0 kms 5 5 2.72861 0 lehmer 5 5 3.28041 1.11022e-16 minij 5 5 12.4499 0 moler1 5 5 40.0625 0 moler3 5 5 8.66025 0 oto 5 5 5.2915 0 pascal2 5 5 92.4608 0 vand2 5 5 6674.68 9.23931e-13 test_null_left(): A = a test matrix of order M by N; x = an M vector, candidate for a left null vector. |A| = Frobenius norm of A. |x| = L2 norm of x. |A'*x|/|x| = L2 norm of A'*x over L2 norm of x. Title M N |A| |x| |A'*x|/|x| a123 3 3 16.8819 2.44949 0 cheby_diff1 5 5 13.4722 3.74166 4.9e-16 creation 5 5 5.47723 1 0 dif1 5 5 2.82843 1.73205 0 dif1cyclic 5 5 3.16228 2.23607 0 dif2cyclic 5 5 5.47723 2.23607 0 eberlein 5 5 25.9968 2.23607 0 fibonacci1 5 5 18.3537 1.73205 5.1e-16 lauchli 6 5 2.35351 2.26004 0 line_adj 7 7 3.4641 2 0 moler2 5 5 101035 263.82 0 one 5 5 5 1.41421 0 ring_adj 12 12 4.89898 3.4641 0 rosser1 8 8 2482.26 22.3607 0 zero 5 5 0 0 Inf test_null_right(): A = a test matrix of order M by N; x = an N vector, candidate for a right null vector. |A| = Frobenius norm of A. |x| = L2 norm of x. |A*x|/|x| = L2 norm of A*x over L2 norm of x. Title M N |A| |x| |A*x|/|x| a123 3 3 16.8819 2.44949 0 archimedes 7 8 93.397 1.87697e+07 0 cheby_diff1 5 5 13.4722 2.23607 6.5e-16 creation 5 5 5.47723 1 0 dif1 5 5 2.82843 1.73205 0 dif1cyclic 5 5 3.16228 2.23607 0 dif2cyclic 5 5 5.47723 2.23607 0 fibonacci1 5 5 18.3537 1.73205 0 hamming 5 31 8.94427 2.44949 0 line_adj 7 7 3.4641 2 0 moler2 5 5 101035 1016.3 0 neumann 25 25 23.2379 5 0 one 5 5 5 1.41421 0 ring_adj 12 12 4.89898 3.4641 0 rosser1 8 8 2482.26 22.3607 0 zero 5 5 0 2.23607 0 test_plu(): A = a test matrix of order M by N P, L, U are the PLU factors. |A| = Frobenius norm of A. |A-PLU| = Frobenius norm of A-P*L*U. Title M N |A| |A-PLU| a123 3 3 16.8819 6.8798e-15 bodewig 4 4 12.7279 4.1243e-15 borderband 5 5 2.76699 0 dif2 5 5 5.2915 0 gfpp 5 5 3.17459 2.22045e-16 givens 5 5 20.6155 0 golub 5 5 500.265 0 kms 5 5 2.43668 0 lehmer 5 5 3.28041 1.11022e-16 maxij 5 5 19.8746 0 minij 5 5 12.4499 0 moler1 5 5 3.39724 0 moler3 5 5 8.66025 0 oto 5 5 5.2915 0 pascal2 5 5 92.4608 0 plu 5 5 152.462 0 vand2 4 4 11.1581 8.88247e-16 wilson 4 4 30.545 7.32411e-15 test_solution(): Compute the Frobenius norm of the solution error: A * X - B given MxN matrix A, NxK solution X, MxK right hand side B. Title M N K |A| |A*X-B| A123 3 3 1 16.881943 0.000000 bodewig 4 4 1 12.727922 0.000000 dif2 10 10 2 7.615773 0.000000 frank 10 10 2 38.665230 0.000000 poisson 20 20 1 19.544820 0.000000 wilk03 3 3 1 1.392839 0.000001 wilk04 4 4 1 1.895450 0.000040 wilson 4 4 1 30.545049 0.000000 test_type(): Demonstrate functions which test the type of a matrix. Title M N |A| |Transition Error| bodewig 4 4 12.7279 Inf snakes 101 101 5.92077 9.80522e-16 transition_random 5 5 1.1528 2.22045e-16 test_matrix_test(): Normal end of execution. 14-Oct-2022 10:45:11