08-Oct-2025 20:12:32 test_matrix_test() MATLAB/Octave version 6.4.0 test_matrix() defines various 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.05916e-15 R8MAT_IS_LLT_TEST Normal end of execution. 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 6 by 10 X is 10 by 3 B is 6 by 3 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 1.79709 1.79709 1.79709 bauer 6 8.52877e+06 8.52877e+06 8.52877e+06 bernstein 10 153600 168960 168960 bis 5 301626 301626 301626 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 2.63458 2.63458 2.63458 companion 5 20.7994 20.7994 20.7994 conex1 4 20.4248 20.4248 20.4248 conex2 3 17.0496 17.0496 17.0496 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 7.17596 7.17596 7.17596 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 20.4852 20.4852 20.4852 givens 5 50 50 50 hankel_n 5 5.8368 5.8368 5.8368 harman 8 77.069 77.069 77.069 hartley 5 5 5 5 identity 5 1 1 1 ill3 3 216775 216775 216775 involutory 5 1.14582e+07 1.14582e+07 1.14582e+07 jordan 5 41.9364 41.9364 41.9364 kershaw 4 49 49 49 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 orthogonal_symmetric 5 4.39765 4.39765 4.39765 oto 5 18 18 18 pascal1 5 100 100 100 pascal3 5 1002.13 1002.13 1002.13 pei 5 2.28446 2.28446 2.28446 permutation_random 5 1 1 1 rodman 5 7.97627 7.97627 7.97627 rutis1 4 15 15 15 rutis2 4 11.44 11.44 11.44 rutis3 4 6 6 6 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 44.6171 44.6171 44.6171 upshift 5 1 1 1 wilk03 3 2.6e+10 2.6e+10 2.6e+10 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 test_matrix(). 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 0 17 aegerter 5 -25 -25 9.4 anticirculant 3 81.8133 81.8133 8.6 anticirculant 4 -112.278 -112.278 13 anticirculant 5 -9513.39 -9513.39 15 antihadamard 5 1 1 3.3 antisummation 5 1 1 3.9 antisymmetric_random 4 4.91506 1.04329 2.6 antisymmetric_random 5 0 1.43793e-15 4.7 antisymmetric_random 6 0.106292 4.58515 4.9 bab 5 67.9475 67.9475 7.2 bauer 6 1 1 1.9e+02 bernstein 5 96 2500 68 bimarkov_random 5 -0.0194833 1.4 bis 5 1859.59 1859.59 11 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 2.80075e-13 2.80075e-13 1.4 cauchy 5 -10.4869 -10.4869 13 cheby_diff1 5 -5.32907e-14 13 cheby_diff1 6 -8.52651e-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.127117 -0.127117 3.9e+02 circulant 5 2213.65 2213.65 14 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 9.1 clement2 6 -180.807 -180.807 10 combin 5 0.080812 -180.807 10 companion 5 -1.80831 -1.80831 6.2 complex_i 2 1 1 1.4 conex1 4 0.833075 0.833075 3.9 conex2 3 -0.206018 -0.206018 2.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 689.067 689.067 8.6 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 3.93098e+08 3.93098e+08 2e+02 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 2.55795e-11 43 eulerian 5 1 1 77 exchange 5 1 1 2.2 fibonacci1 5 0 -1.21685e-43 75 fibonacci2 5 -1 -1 3 fibonacci3 5 8 8 3.6 fiedler 7 38.0646 38.0646 20 forsythe 5 -237.518 -237.518 7.6 forsythe 6 3832.37 3832.37 10 fourier_cosine 5 1 1 2.2 fourier_sine 5 1 1 2.2 frank 5 1 1 12 gfpp 5 1092.52 1092.52 15 givens 5 16 16 21 gk316 5 -25 -25 9.4 gk323 5 32 32 10 gk324 5 -75.8261 -75.8261 11 golub 5 1 1 4.1e+02 grcar 5 16 4.4 hadamard 5 0 4 hankel 5 1301.23 14 hankel_n 5 3125 3125 15 hanowa 6 22808.5 22808.5 13 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 0 0 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.7 involutory 5 -1 -1 1.9e+03 involutory_random 5 -1 2.2 jacobi_legendre 5 0 0 1.5 jacobi_legendre 6 -0.021645 -0.021645 1.7 jordan 6 0.0145894 0.0145894 2.5 kahan 5 1.24464e-06 1.24464e-06 0.9 kershaw 4 1 1 8.2 kershawtri 5 -12.916 -12.916 7.5 kms 5 0.841221 0.841221 2.3 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 -0.0306272 16 lotkin 5 1.87465e-11 1.87465e-11 2.5 markov_random 5 0.000494835 1.1 maxij 5 5 5 20 milnes 5 0.827373 0.827373 5.8 minij 5 1 1 12 moler1 5 1 1 49 moler2 5 0 0 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 54.7972 54.7972 1.3e+02 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 42 pei 5 0.653558 0.653558 4.6 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 4.5218e-34 1.7 prolate 5 -58.2552 5.1 rectangle_adj 25 0 0 8.9 redheffer 5 -2 -2 3.7 ref_random 5 0 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.0922452 -0.0922452 2.5 rosser1 8 0 -4138.53 2.5e+03 routh 5 0.307497 0.307497 3.4 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 -1326.57 -1326.57 9.9 skew_circulant 5 -3710.6 -3710.6 19 spd_random 5 0.0193821 0.000756289 1 spline 5 22.9343 22.9343 8.6 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 -27.6635 13 sylvester_kac 5 0 0 7.7 sylvester_kac 6 -225 -225 10 symmetric_random 5 120.231 120.231 6.6 toeplitz 5 939.389 11 toeplitz_5diag 5 -1991.79 14 toeplitz_5s 25 3.78204e+09 17 toeplitz_spd 5 -0.675321 3.1 tournament_random 8 169 1 7.5 tournament_random 9 0 3.29736e-13 8.5 tournament_random 10 2809 3025 9.5 transition_random 5 -0.00359439 1.2 trench 5 4.97743 3.7 tri_upper 5 1 1 5.7 tris 5 -128.172 -128.172 8.6 triv 5 -872.92 -872.92 11 triw 5 1 1 2.2 unitary_random 5 1 1 3.2 upshift 5 1 1 2.2 vand1 5 21324.1 21324.1 5.8e+02 vand2 5 -744.719 -744.719 5.1e+02 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 -2.2135e+25 1e+02 wilk21 21 -4.15825e+12 -4.15825e+12 28 wilson 4 1 1 31 zero 5 0 0 0 zielke 5 -51.3512 5.2 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.22715e-14 carry 5 5 1.41391 3.598e-15 chow 5 5 1071.06 3.76214e-12 diagonal 5 5 6.01203 0 rosser1 8 8 2482.26 2.58463e-11 symmetric_random 5 5 6.20926 7.93894 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.44309e-14 bab 5 5 9.69925 3.13673e-15 bodewig 4 4 12.7279 9.13846e-15 carry 5 5 1.5052 0 chow 5 5 1928.21 1.31396e-12 combin 5 5 25.348 0 defective 2 1 1.73205 0 dif2 5 5 5.2915 1.07099e-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.70923 identity 5 5 2.23607 0 ill3 3 3 817.763 1.62392e-11 kershaw 4 4 8.24621 4.79587e-15 kms 5 5 2.97816 1.95749e-09 line_adj 5 5 2.82843 8.99223e-16 line_loop_adj 5 5 3.60555 9.99459e-16 magic 5 1 74.3303 0 one 5 5 5 0 ortega 5 5 115.179 7.0889e-13 oto 5 5 5.2915 1.07099e-15 pei 5 5 5.94156 0 reflection_random 5 5 2.23607 2.55768 rodman 5 5 2.72366 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.19619e-14 rutis5 4 4 23.7697 1.48034e-14 spd_random 5 5 1.60539 0.643753 sylvester_kac 5 5 7.74597 0 symmetric_random 5 5 5.67052 7.8974 tribonacci2 5 5 3.31662 1.02075e-15 wilson 4 4 30.545 2.51254e-14 zero 5 5 0 0 test_inverse(): A = a test matrix; B = inverse as returned by test_matrix(). C = inverse as computed by the 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 7.45411e-16 7.60498e-16 anticirculant 5 20 0.86 2.67649e-15 1.54314e-15 antisummation 5 3.9 11 0 0 bab 5 13 3.4 3.19751e-15 1.94035e-15 bauer 6 1.9e+02 2.1e+04 7.20219e-11 0 bernstein 5 68 3.6 2.25776e-15 2.29231e-15 bis 5 12 3.2 1.16512e-15 1.16512e-15 biw 5 2.4 26 3.21397e-15 1.03492e-15 bodewig 4 13 0.68 8.33213e-16 6.51921e-16 boothroyd 5 8.9e+02 8.9e+02 2.34342e-11 0 borderband 5 2.8 6.8 0 0 carry 5 1.4 3.9e+05 4.35768e-11 3.29363e-11 cauchy 5 4 36 1.84897e-14 2.98813e-14 cheby_t 5 13 1.9 0 0 cheby_u 5 22 1.2 0 0 cheby_van2 5 2.2 2.5 3.71135e-16 5.91396e-16 cheby_van3 5 3.9 1.3 7.21507e-16 8.91495e-16 chow 5 1.2e+03 43 1.68522e-13 1.82902e-13 circulant 5 13 0.77 8.92983e-16 2.10206e-15 circulant2 5 17 0.64 8.83531e-16 1.44334e-15 clement1 6 8.4 1.5 6.22161e-16 1.51231e-16 clement2 6 7.5 1.2e+03 5.09254e-13 5.09197e-13 combin 5 22 0.73 1.57984e-15 9.90646e-16 companion 5 6.8 2.4 6.95648e-16 3.5549e-16 complex_i 2 1.4 1.4 0 0 conex1 4 14 10 2.0172e-15 2.0172e-15 conex2 3 2.6 7.1 4.07083e-16 6.62811e-16 conex3 5 3.9 11 0 0 conference 6 5.5 1.1 7.13433e-16 0 daub2 4 2 2 4.05861e-17 9.04425e-16 daub4 8 2.8 2.8 3.9798e-16 1.9322e-15 daub6 12 3.5 3.5 8.47372e-16 9.82957e-16 daub8 16 4 4 1.4732e-15 4.66496e-15 daub10 20 4.5 4.5 1.23147e-15 8.69556e-15 daub12 24 4.9 4.9 1.41887e-15 1.96031e-14 defective 2 1.7 1.7 0 0 diagonal 5 7.3 1.5 0 0 dif1 6 3.2 3.5 0 0 dif2 5 5.3 3.9 3.15194e-15 6.86635e-16 dorr 5 3.3e+02 0.06 1.61219e-15 2.19251e-15 downshift 5 2.2 2.2 0 0 drmac_bad 3 1e+40 1 258.639 8623.15 drmac_good 3 1.7 1.8 6.72901e-16 8.17685e-17 eulerian 5 77 7.8e+02 0 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 32 4.1 7.48313e-14 3.92777e-15 forsythe 5 4.3 2.4 5.3544e-16 8.53817e-16 fourier_cosine 5 2.2 2.2 6.48789e-16 9.97837e-16 fourier_sine 5 2.2 2.2 7.05583e-16 1.75396e-15 frank 5 12 59 2.79341e-14 0 gfpp 5 4.8 1.3 6.13276e-16 8.4643e-16 givens 5 21 2.7 2.55593e-15 0 gk316 5 9.4 1.8 7.45411e-16 7.60498e-16 gk323 5 10 2.3 0 0 gk324 5 10 1.4 9.63675e-16 9.33348e-16 golub 5 3.4e+02 1.7e+05 1.14465e-09 6.04623e+07 hankel 5 16 0.36 9.42621e-16 6.52739e-16 hankel_n 6 21 0.51 3.69264e-16 2.85866e-16 hanowa 6 11 0.54 3.42557e-16 3.42937e-16 harman 8 5.1 15 8.67649e-15 1.03733e-14 hartley 5 5 1 8.3212e-16 2.62209e-15 helmert 5 2.2 2.2 4.89419e-16 8.22154e-16 helmert2 5 2.2 2.2 3.71436e-16 5.52824e-16 hermite 5 54 1.8 0 0 herndon 5 1.8 9.4 1.38538e-15 7.60498e-16 hilbert 5 1.6 3e+05 1.23973e-11 1.25984e-11 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.17847e-11 5.00088e-12 integration 6 3.2 3.7 1.3178e-16 4.42327e-16 involutory 5 1.9e+03 1.9e+03 5.25022e-11 4.47895e-12 jacobi_legendre 6 1.7 6.5 4.60675e-16 2.68878e-16 jordan 5 7.3 0.74 9.55329e-18 5.33462e-17 kahan 5 0.53 1.9e+03 1.92553e-14 1.57305e-14 kershaw 4 8.2 8.2 1.06303e-14 0 kershawtri 5 5.7 2.5 8.27142e-16 3.92912e-16 kms 5 14 5.1 5.62717e-15 6.04867e-15 laguerre 5 6.9 2e+02 1.83023e-15 1.83023e-15 legendre 5 6.8 1.9 3.25451e-16 2.93597e-16 lehmer 5 3.3 7.7 2.97595e-15 1.42676e-15 lesp 5 22 0.32 3.7458e-16 7.45635e-16 lietzke 5 18 2.4 2.70034e-15 5.80881e-16 line_adj 6 3.2 3.5 0 0 lotkin 5 2.5 2.4e+05 8.80902e-11 9.07568e-12 maxij 5 20 4.7 2.5831e-15 9.93014e-16 milnes 5 10 3.6 1.39455e-15 2.33386e-15 minij 5 12 5 0 0 moler1 5 15 5.8 5.51221e-15 4.84849e-15 moler3 5 8.7 1.2e+02 0 0 ortega 5 4.5e+02 5e+02 2.36635e-11 6.17947e-11 orthogonal_random 5 2.2 2.2 8.79022e-16 5.7765 orthogonal_symmetric 5 2.2 2.2 1.11098e-15 2.37187e-15 oto 5 5.3 3.9 3.15194e-15 6.86635e-16 parter 5 6.3 0.94 2.90162e-16 9.1636e-17 pascal1 5 9.9 9.9 0 0 pascal2 5 92 92 0 0 pascal3 5 1.5e+02 1.5e+02 2.64562e-13 8.67328e-14 pei 5 4.7 6.5 2.19254e-15 1.14853e-15 permutation_random 5 2.2 2.2 0 6.32456 plu 5 1.5e+02 0.14 9.07083e-16 1.40054e-15 ris 5 3.2 1.9 3.24396e-16 1.0278e-16 rodman 5 9 2.1 1.84075e-15 5.4786e-16 rutis1 4 17 1 1.37887e-15 9.03656e-16 rutis2 4 11 1.1 2.54552e-15 7.90425e-16 rutis3 4 14 0.58 6.86913e-16 4.67455e-16 rutis4 4 51 18 1.39537e-13 7.50026e-14 rutis5 4 24 1.9e+03 7.0685e-12 0 schur_block 5 7.1 1.1 3.40935e-16 6.29445e-16 spd_random 5 1.6 15 3.57548e-15 34.514 spline 5 19 0.46 1.13795e-15 1.01368e-15 stirling 5 68 32 0 0 summation 5 3.9 3 0 0 sweet1 6 70 0.26 2.41777e-15 1.0869e-13 sweet2 6 30 1.4 4.24738e-15 3.44018e-14 sweet3 6 73 0.34 1.25277e-15 1.4334e-13 sweet4 13 1.2e+02 0.38 3.44346e-15 2.56934e-13 sylvester_kac 6 10 2.5 2.77556e-16 2.77556e-16 symmetric_random 5 8 0.88 5.36179e-16 8.35098 toeplitz 5 12 2.4 3.62567e-15 4.98558e-14 tri_upper 5 2.3 2.3 1.35974e-16 1.38778e-17 tris 5 11 1.9 1.28906e-15 1.1899e-15 triv 5 9.1 4.5 3.08179e-15 3.02476e-15 triw 5 9.8 5.4e+02 1.18874e-14 1.18874e-14 unitary_random 5 3.1 3.1 4.2725e-08 3.59403 upshift 5 2.2 2.2 0 0 vand1 5 1.1e+02 7.6 3.3683e-14 2.76851e-14 vand2 5 4.8e+02 10 2.72999e-13 2.44158e-13 wilk03 3 1.4 1.8e+10 6.7435e-07 6.7435e-07 wilk04 4 1.9 1.2e+16 0.000392524 10.7174 wilk05 5 1.5 3.1e+06 4.34619e-10 1.21955e-09 wilk21 21 28 4.3 1.65683e-15 3.84555e-15 wilson 4 31 99 4.97861e-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 1.17495e-15 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 3.29345e-15 hilbert 5 5 1.58091 2.77556e-17 kershaw 4 4 8.24621 2.522e-15 lehmer 5 5 3.28041 1.57009e-16 minij 5 5 12.4499 0 moler1 5 5 21.1984 1.77636e-15 moler3 5 5 8.66025 0 oto 5 5 5.2915 7.02167e-16 pascal2 5 5 92.4608 0 wilk05 5 5 1.51485 1.33602e-15 wilson 4 4 30.545 5.25453e-15 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 5.1e-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 17.6848 2.23607 8.9e-16 fibonacci1 5 5 6.34148 1.73205 0 lauchli 6 5 8.70036 4.37484 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 8.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 fibonacci1 5 5 87.3725 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.17774e-15 borderband 5 5 2.76699 0 dif2 5 5 5.2915 0 gfpp 5 5 14.7278 0 givens 5 5 20.6155 0 golub 5 5 510.072 805.304 kms 5 5 165.384 2.98753e-12 lehmer 5 5 3.28041 0 maxij 5 5 19.8746 0 minij 5 5 12.4499 0 moler1 5 5 77.8574 6.15348e-15 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 127.308 1.24834e-14 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.000056 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.11202 2.48253e-16 test_matrix_test(): Normal end of execution. 08-Oct-2025 20:12:33