20-May-2023 10:35:36 r8ge_test(): MATLAB/Octave version 5.2.0 Test r8ge(). i4_log_10_test(): i4_log_10(): whole part of log base 10, X, I4_LOG_10 0 0 1 0 2 0 3 0 9 0 10 1 11 1 99 1 101 2 -1 0 -2 0 -3 0 -9 0 i4vec_print_test(): i4vec_print() prints an I4VEC The I4VEC: 1: 91 2: 92 3: 93 4: 94 r8_sign_test(): r8_sign() returns the sign of an R8. R8 R8_SIGN(R8) -1.250000 -1.000000 -0.250000 -1.000000 0.000000 1.000000 0.500000 1.000000 9.000000 1.000000 r8ge_cg_test(): r8ge_cg() applies CG to an R8GE matrix. Number of variables N = 10 Norm of residual |Ax-b| = 5.92697e-16 Norm of error |x1-x2| = 6.73609e-16 r8ge_co_test(): r8ge_co() estimates the condition number of an R8GE matrix. Matrix order N = 4 The L1 condition number is 10.000000 The R8GE_CO estimate is 7.000000 r8ge_det_test(): r8ge_det() computes the determinant of an R8GE matrix. R8GE_DET computes the determinant = 112.000000 Exact determinant = 112.000000 r8ge_dif2_test(): r8ge_dif2() returns the second difference matrix. DIF2 matrix: 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 5 0 0 0 -1 r8ge_dilu_test(): r8ge_dilu() returns the DILU factors of an R8GE matrix. Matrix rows M = 9 Matrix columns N = 9 Matrix A: Col: 1 2 3 4 5 Row --- 1 4 -1 0 -1 0 2 -1 4 -1 0 -1 3 0 -1 4 -1 0 4 -1 0 -1 4 -1 5 0 -1 0 -1 4 6 0 0 -1 0 -1 7 0 0 0 -1 0 8 0 0 0 0 -1 9 0 0 0 0 0 Col: 6 7 8 9 Row --- 1 0 0 0 0 2 0 0 0 0 3 -1 0 0 0 4 0 -1 0 0 5 -1 0 -1 0 6 4 -1 0 -1 7 -1 4 -1 0 8 0 -1 4 -1 9 -1 0 -1 4 DILU factor: 1: 0.25 2: 0.266667 3: 0.267857 4: 0.287179 5: 0.290179 6: 0.290532 7: 0.292202 8: 0.292601 9: 0.292666 r8ge_fa_test(): r8ge_fa() computes the LU factors of an R8GE matrix, so that R8GE_SL can solve the factored system. Matrix order N = 10 Solution: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 9 10: 10 Solution: 1: 1 2: 1 3: 1 4: 1 5: 1 6: 1 7: 1 8: 1 9: 1 10: 1 Solution of transposed system: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 9 10: 10 r8ge_fs_test(): r8ge_fs() factors and solves a linear system involving an R8GE matrix. Matrix order N = 10 Solution: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 9 10: 10 r8ge_fss_test(): r8ge_fss() factors and solves multiple linear systems associated with an R8GE matrix. Matrix order N = 10 Solution: Col: 1 2 3 Row --- 1 1 1 1 2 1 2 2 3 1 3 3 4 1 4 1 5 1 5 2 6 1 6 3 7 1 7 1 8 1 8 2 9 1 9 3 10 1 10 1 r8ge_hilbert_test(): r8ge_hilbert() returns the Hilbert matrix. Hilbert matrix: Col: 1 2 3 4 Row --- 1 1 0.5 0.333333 0.25 2 0.5 0.333333 0.25 0.2 3 0.333333 0.25 0.2 0.166667 4 0.25 0.2 0.166667 0.142857 5 0.2 0.166667 0.142857 0.125 r8ge_hilbert_inverse_test(): r8ge_hilbert_inverse() computes the inverse of the Hilbert matrix, stored as an R8GE matrix. Matrix order N = 4 Matrix A: Col: 1 2 3 4 Row --- 1 1 0.5 0.333333 0.25 2 0.5 0.333333 0.25 0.2 3 0.333333 0.25 0.2 0.166667 4 0.25 0.2 0.166667 0.142857 Inverse matrix B: Col: 1 2 3 4 Row --- 1 16 -120 240 -140 2 -120 1200 -2700 1680 3 240 -2700 6480 -4200 4 -140 1680 -4200 2800 Product A * B: Col: 1 2 3 4 Row --- 1 1 0 0 0 2 0 1 0 0 3 0 0 1 -5.68434e-14 4 0 0 0 1 r8ge_identity_test(): r8ge_identity() returns an identity matrix. Identity matrix: Col: 1 2 3 4 Row --- 1 1 0 0 0 2 0 1 0 0 3 0 0 1 0 4 0 0 0 1 5 0 0 0 0 r8ge_ilu_test(): r8ge_ilu() returns the ILU factors of an R8GE matrix. Matrix rows M = 9 Matrix columns N = 9 Matrix A: Col: 1 2 3 4 5 Row --- 1 4 -1 0 -1 0 2 -1 4 -1 0 -1 3 0 -1 4 -1 0 4 -1 0 -1 4 -1 5 0 -1 0 -1 4 6 0 0 -1 0 -1 7 0 0 0 -1 0 8 0 0 0 0 -1 9 0 0 0 0 0 Col: 6 7 8 9 Row --- 1 0 0 0 0 2 0 0 0 0 3 -1 0 0 0 4 0 -1 0 0 5 -1 0 -1 0 6 4 -1 0 -1 7 -1 4 -1 0 8 0 -1 4 -1 9 -1 0 -1 4 Factor L: Col: 1 2 3 4 5 Row --- 1 1 0 0 0 0 2 -0.25 1 0 0 0 3 0 -0.266667 1 0 0 4 -0.25 0 -0.267857 1 0 5 0 -0.266667 0 -0.287179 1 6 0 0 -0.267857 0 -0.290179 7 0 0 0 -0.287179 0 8 0 0 0 0 -0.290179 9 0 0 0 0 0 Col: 6 7 8 9 Row --- 1 0 0 0 0 2 0 0 0 0 3 0 0 0 0 4 0 0 0 0 5 0 0 0 0 6 1 0 0 0 7 -0.290532 1 0 0 8 0 -0.292202 1 0 9 -0.290532 0 -0.292601 1 Factor U: Col: 1 2 3 4 5 Row --- 1 4 -1 0 -1 0 2 0 3.75 -1 0 -1 3 0 0 3.73333 -1 0 4 0 0 0 3.48214 -1 5 0 0 0 0 3.44615 6 0 0 0 0 0 7 0 0 0 0 0 8 0 0 0 0 0 9 0 0 0 0 0 Col: 6 7 8 9 Row --- 1 0 0 0 0 2 0 0 0 0 3 -1 0 0 0 4 0 -1 0 0 5 -1 0 -1 0 6 3.44196 -1 0 -1 7 0 3.42229 -1 0 8 0 0 3.41762 -1 9 0 0 0 3.41687 Product L*U: Col: 1 2 3 4 5 Row --- 1 4 -1 0 -1 0 2 -1 4 -1 0.25 -1 3 0 -1 4 -1 0.266667 4 -1 0.25 -1 4 -1 5 0 -1 0.266667 -1 4 6 0 0 -1 0.267857 -1 7 0 0 0 -1 0.287179 8 0 0 0 0 -1 9 0 0 0 0 0 Col: 6 7 8 9 Row --- 1 0 0 0 0 2 0 0 0 0 3 -1 0 0 0 4 0.267857 -1 0 0 5 -1 0.287179 -1 0 6 4 -1 0.290179 -1 7 -1 4 -1 0.290532 8 0.290179 -1 4 -1 9 -1 0.290532 -1 4 r8ge_indicator_test(): r8ge_indicator() returns an indicator matrix. Indicator matrix: Col: 1 2 3 4 Row --- 1 11 12 13 14 2 21 22 23 24 3 31 32 33 34 4 41 42 43 44 5 51 52 53 54 r8ge_inverse_test(): r8ge_inverse() computes the inverse of an R8GE matrix. Matrix order N = 4 Matrix A: Col: 1 2 3 4 Row --- 1 5 3 3 3 2 3 5 3 3 3 3 3 5 3 4 3 3 3 5 Inverse matrix B: Col: 1 2 3 4 Row --- 1 0.392857 -0.107143 -0.107143 -0.107143 2 -0.107143 0.392857 -0.107143 -0.107143 3 -0.107143 -0.107143 0.392857 -0.107143 4 -0.107143 -0.107143 -0.107143 0.392857 Product matrix: Col: 1 2 3 4 Row --- 1 1 -1.11022e-16 0 0 2 3.33067e-16 1 0 0 3 4.44089e-16 -1.11022e-16 1 2.22045e-16 4 4.44089e-16 -1.11022e-16 0 1 r8ge_ml_test(): r8ge_ml() computes A*x or A'*X where A has been factored by R8GE_FA. Matrix order N = 10 A*x and PLU*x 1: 25.8125 25.8125 2: 39.2096 39.2096 3: 22.1334 22.1334 4: 28.4058 28.4058 5: 22.2217 22.2217 6: 29.5722 29.5722 7: 22.5872 22.5872 8: 29.1256 29.1256 9: 30.2919 30.2919 10: 17.1554 17.1554 A'*x and (PLU)'*x 1: 22.3984 22.3984 2: 32.7629 32.7629 3: 24.9466 24.9466 4: 25.6776 25.6776 5: 25.5495 25.5495 6: 27.3074 27.3074 7: 17.3462 17.3462 8: 29.3279 29.3279 9: 26.9023 26.9023 10: 20.596 20.596 r8ge_mm_test(): r8ge_mm() computes a matrix-matrix product C = A * B. A: Col: 1 2 3 Row --- 1 1 0 0 2 1 1 0 3 1 2 1 4 1 3 3 B: Col: 1 2 3 4 Row --- 1 1 1 1 1 2 0 1 2 3 3 0 0 1 3 C = A*B: Col: 1 2 3 4 Row --- 1 1 1 1 1 2 1 2 3 4 3 1 3 6 10 4 1 4 10 19 r8ge_mtm_test(): r8ge_mtm(): computes a matrix-matrix product C = A' * B. A': Row: 1 2 3 Col 1: 1 1 1 2: 0 1 2 3: 0 0 1 4: 0 0 0 B: Col: 1 2 3 4 Row --- 1 1 0 0 0 2 1 1 0 0 3 1 2 1 0 C = A'*B: Col: 1 2 3 4 Row --- 1 3 3 1 0 2 3 5 2 0 3 1 2 1 0 4 0 0 0 0 r8ge_mtv_test(): r8ge_mtv() computes a product b=A'*x for an R8GE matrix. The R8GE matrix A: Col: 1 2 3 4 Row --- 1 11 12 13 14 2 21 22 23 24 3 31 32 33 34 4 41 42 43 44 5 51 52 53 54 Vector x: 1: 1 2: 2 3: 3 4: 4 5: 5 Vector b = A'*x: 1: 565 2: 580 3: 595 4: 610 r8ge_mu_test(): r8ge_mu() computes A*x or A'*X where A has been factored by R8GE_TRF. Matrix rows M = 5 Matrix columns N = 3 A*x and PLU*x 1: 3.79724 3.79724 2: 3.51495 3.51495 3: 4.19417 4.19417 4: 3.97408 3.97408 5: 2.95671 2.95671 A'*x and (PLU)'*x 1: 12.9443 12.9443 2: 2.28434 2.28434 3: 8.6958 8.6958 Matrix is 3 by 5 A*x and PLU*x 1: 8.45136 8.45136 2: 6.01704 6.01704 3: 6.46345 6.46345 A'*x and (PLU)'*x 1: 3.99494 3.99494 2: 3.66861 3.66861 3: 2.21231 2.21231 4: 0.904417 0.904417 5: 3.88793 3.88793 r8ge_mv_test(): r8ge_mv() computes a product b=A*x for an R8GE matrix. The R8GE matrix A: Col: 1 2 3 4 Row --- 1 11 12 13 14 2 21 22 23 24 3 31 32 33 34 4 41 42 43 44 5 51 52 53 54 Vector x: 1: 1 2: 2 3: 3 4: 4 Vector b = A*x: 1: 130 2: 230 3: 330 4: 430 5: 530 r8ge_plu_test(): r8ge_plu() returns the PLU factors of an R8GE matrix. Matrix rows M = 5 Matrix columns N = 4 Matrix A: Col: 1 2 3 4 Row --- 1 0.341036 0.978573 0.0568016 0.482489 2 0.341066 0.00109744 0.988066 0.407848 3 0.065434 0.511077 0.879963 0.358644 4 0.877945 0.209886 0.913579 0.795127 5 0.590292 0.557839 0.64835 0.973537 Factor P: Col: 1 2 3 4 5 Row --- 1 0 1 0 0 0 2 0 0 0 0 1 3 0 0 1 0 0 4 1 0 0 0 0 5 0 0 0 1 0 Factor L: Col: 1 2 3 4 5 Row --- 1 1 0 0 0 0 2 0.388448 1 0 0 0 3 0.0745309 0.552297 1 0 0 4 0.672357 0.46455 0.176723 1 0 5 0.388482 -0.0896717 0.621022 -0.0367589 1 Factor U: Col: 1 2 3 4 Row --- 1 0.877945 0.209886 0.913579 0.795127 2 0 0.897043 -0.298076 0.173623 3 0 0 0.9765 0.203491 4 0 0 0 0.32231 5 0 0 0 0 Product P*L*U: Col: 1 2 3 4 Row --- 1 0.341036 0.978573 0.0568016 0.482489 2 0.341066 0.00109744 0.988066 0.407848 3 0.065434 0.511077 0.879963 0.358644 4 0.877945 0.209886 0.913579 0.795127 5 0.590292 0.557839 0.64835 0.973537 r8ge_poly_test(): r8ge_poly() computes the characteristic polynomial of an R8GE matrix. Matrix order N = 12 I, P(I), True P(I) 1: 1 1 2: -23 -23 3: 231 231 4: -1330 -1330 5: 4845 4845 6: -11628 -11628 7: 18564 18564 8: -19448 -19448 ...... .............. .............. 13: 1 1 r8ge_print_test(): r8ge_print() prints an R8GE matrix. The R8GE matrix: Col: 1 2 3 4 Row --- 1 11 12 13 14 2 21 22 23 24 3 31 32 33 34 4 41 42 43 44 5 51 52 53 54 6 61 62 63 64 r8ge_print_some_test(): r8ge_print_some() prints some of an R8GE matrix. The R8GE matrix, rows 2:4, cols 1:2: Col: 1 2 Row --- 2 21 22 3 31 32 4 41 42 r8ge_random_test(): r8ge_random() returns a random R8GE matrix. Random matrix: Col: 1 2 3 4 Row --- 1 0.456651 0.486232 0.671533 0.8675 2 0.0513535 0.975624 0.504789 0.350579 3 0.984123 0.563282 0.198357 0.403213 4 0.757198 0.287079 0.270416 0.792762 5 0.362688 0.865038 0.271543 0.684008 r8ge_res_test(): r8ge_res() computes b-A*x, where A is an R8GE matrix. We check three cases, MN. Residual A*x-b: 1: 0 2: 0 3: 0 Residual A*x-b: 1: 0 2: 0 3: 0 4: 0 5: 0 Residual A*x-b: 1: 0 2: 0 3: 0 4: 0 5: 0 r8ge_sl_test(): r8ge_sl() solves a linear system that was factored by R8GE_FA. Matrix order N = 10 Solution: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 9 10: 10 Solution: 1: 1 2: 1 3: 1 4: 1 5: 1 6: 1 7: 1 8: 1 9: 1 10: 1 Solution of transposed system: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 9 10: 10 r8ge_sl_it_test(): r8ge_sl_it() applies one step of iterative refinement to a R8GE_SL solution. Matrix order N = 6 i, x, b-A*x 1: 0.166667 0 2: 0.142857 -9.09495e-13 3: 0.125 -1.45519e-11 4: 0.111111 -5.82077e-11 5: 0.1 0 6: 0.0909091 -1.45519e-11 Iterative refinement step 1 I, DX: 1 -2.22826e-11 2 -1.76615e-11 3 -1.4658e-11 4 -1.25395e-11 5 -1.09616e-11 6 -9.73934e-12 i, x, b-A*x 1: 0.166667 5.68434e-14 2: 0.142857 1.81899e-12 3: 0.125 7.27596e-12 4: 0.111111 2.91038e-11 5: 0.1 -2.91038e-11 6: 0.0909091 2.91038e-11 Iterative refinement step 2 I, DX: 1 9.69749e-12 2 7.58156e-12 3 6.25981e-12 4 5.34414e-12 5 4.66856e-12 6 4.148e-12 i, x, b-A*x 1: 0.166667 -2.84217e-14 2: 0.142857 0 3: 0.125 1.45519e-11 4: 0.111111 5.82077e-11 5: 0.1 2.91038e-11 6: 0.0909091 -1.45519e-11 Iterative refinement step 3 I, DX: 1 2.27696e-11 2 1.80371e-11 3 1.49409e-11 4 1.27547e-11 5 1.11277e-11 6 9.86925e-12 i, x, b-A*x 1: 0.166667 2.84217e-14 2: 0.142857 -2.72848e-12 3: 0.125 7.27596e-12 4: 0.111111 -8.73115e-11 5: 0.1 8.73115e-11 6: 0.0909091 -7.27596e-12 Iterative refinement step 4 I, DX: 1 -4.48874e-12 2 -3.0261e-12 3 -2.2058e-12 4 -1.69351e-12 5 -1.3499e-12 6 -1.10713e-12 i, x, b-A*x 1: 0.166667 2.84217e-14 2: 0.142857 -1.81899e-12 3: 0.125 0 4: 0.111111 0 5: 0.1 0 6: 0.0909091 -7.27596e-12 Iterative refinement step 5 I, DX: 1 -2.09373e-12 2 -1.63154e-12 3 -1.35477e-12 4 -1.16513e-12 5 -1.02508e-12 6 -9.16569e-13 i, x, b-A*x 1: 0.166667 2.84217e-14 2: 0.142857 -9.09495e-13 3: 0.125 2.18279e-11 4: 0.111111 5.82077e-11 5: 0.1 0 6: 0.0909091 -2.91038e-11 r8ge_to_r8vec_test(): r8ge_to_r8vec() converts an R8GE matrix to an R8VEC vector. R8GE matrix: Col: 1 2 3 Row --- 1 11 12 13 2 21 22 23 3 31 32 33 4 41 42 43 Corresponding R8VEC vector: 1: 11 2: 21 3: 31 4: 41 5: 12 6: 22 7: 32 8: 42 9: 13 10: 23 11: 33 12: 43 r8ge_transpose_print_test(): r8ge_transpose_print() prints an R8GE, transposed. Matrix row order M = 7 Matrix column order N = 12 The transposed matrix A: Row: 1 2 3 4 5 Col 1: 101 201 301 401 501 2: 102 202 302 402 502 3: 103 203 303 403 503 4: 104 204 304 404 504 5: 105 205 305 405 505 6: 106 206 306 406 506 7: 107 207 307 407 507 8: 108 208 308 408 508 9: 109 209 309 409 509 10: 110 210 310 410 510 11: 111 211 311 411 511 12: 112 212 312 412 512 Row: 6 7 Col 1: 601 701 2: 602 702 3: 603 703 4: 604 704 5: 605 705 6: 606 706 7: 607 707 8: 608 708 9: 609 709 10: 610 710 11: 611 711 12: 612 712 r8ge_transpose_print_some_test(): r8ge_transpose_print_some() prints some of an R8GE, transposed. Matrix row order M = 9 Matrix column order N = 9 Rows 4-6, Cols 3-8: Row: 4 5 6 Col 3: 43 53 63 4: 44 54 64 5: 45 55 65 6: 46 56 66 7: 47 57 67 8: 48 58 68 r8ge_trf_test(): r8ge_trf() computes the LU factors of an R8GE matrix, so that R8GE_TRS can solve the factored system. Number of matrix rows M = 5 Number of matrix columns N = 5 Solution: 1: 1 2: 2 3: 3 4: 4 5: 5 Solution to transposed system: 1: 1 2: 2 3: 3 4: 4 5: 5 r8ge_trs_test(): r8ge_trs() solves a linear system that has been factored by R8GE_TRF. Number of matrix rows M = 5 Number of matrix columns N = 5 Solution: 1: 1 2: 2 3: 3 4: 4 5: 5 Solution to transposed system: 1: 1 2: 2 3: 3 4: 4 5: 5 r8ge_zeros_test(): r8ge_zeros() zeros out space for an R8GE matrix. Matrix order M, N = 5, 4 Matrix A: Col: 1 2 3 4 Row --- 1 0 0 0 0 2 0 0 0 0 3 0 0 0 0 4 0 0 0 0 5 0 0 0 0 r8vec_indicator1_test(): r8vec_indicator1() returns a 1-based indicator vector. The indicator1 vector: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 9 10: 10 r8vec_print_test(): r8vec_print() prints an R8VEC. The R8VEC: 1: 123.456 2: 5e-06 3: -1e+06 4: 3.14159 r8vec_print_some_test(): r8vec_print_some() prints some of an R8VEC. No more than 10 lines of this vector: 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 ...... .............. 100 100 r8ge_to_r8vec_test(): r8ge_to_r8vec() converts an R8GE matrix to an R8VEC vector. Corresponding R8VEC vector: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 9 10: 10 11: 11 12: 12 R8GE matrix: Col: 1 2 3 Row --- 1 1 5 9 2 2 6 10 3 3 7 11 4 4 8 12 r8vec2_print_some_test(): r8vec2_print_some() prints some of a pair of R8VEC's. Square and square root: 1: 1 1 2: 4 1.41421 3: 9 1.73205 4: 16 2 5: 25 2.23607 6: 36 2.44949 7: 49 2.64575 8: 64 2.82843 ...... .............. .............. 20: 400 4.47214 r8ge_test(): Normal end of execution. 20-May-2023 10:35:36