15 August 2022 07:11:23 PM r83_np_test(): C version Test r83_np(). r83_np_det_test(): r83_np_det() computes the determinant of a tridiagonal matrix after it has been factored by R83_NP_FA. Matrix order N = 10 The R83 matrix: Col: 1 2 3 4 5 Row --- 1 2.000000 -1.000000 2 -1.000000 2.000000 -1.000000 3 -1.000000 2.000000 -1.000000 4 -1.000000 2.000000 -1.000000 5 -1.000000 2.000000 6 -1.000000 Col: 6 7 8 9 10 Row --- 5 -1.000000 6 2.000000 -1.000000 7 -1.000000 2.000000 -1.000000 8 -1.000000 2.000000 -1.000000 9 -1.000000 2.000000 -1.000000 10 -1.000000 2.000000 The factored matrix: Col: 1 2 3 4 5 Row --- 1 2.000000 -1.000000 2 -0.500000 1.500000 -1.000000 3 -0.666667 1.333333 -1.000000 4 -0.750000 1.250000 -1.000000 5 -0.800000 1.200000 6 -0.833333 Col: 6 7 8 9 10 Row --- 5 -1.000000 6 1.166667 -1.000000 7 -0.857143 1.142857 -1.000000 8 -0.875000 1.125000 -1.000000 9 -0.888889 1.111111 -1.000000 10 -0.900000 1.100000 R83_NP_DET computes determinant = 11 Exact determinant = 11 r83_np_fa_test(): r83_np_fa() factors a tridiagonal matrix with no pivoting. Matrix order N = 10 The tridiagonal matrix: Col: 1 2 3 4 5 Row --- 1 0.218418 0.829509 2 0.956318 0.561695 0.066119 3 0.415307 0.257578 0.043829 4 0.109957 0.633966 0.449539 5 0.061727 0.401306 6 0.754673 Col: 6 7 8 9 10 Row --- 5 0.797287 6 0.001838 0.350752 7 0.897504 0.094545 0.859097 8 0.013617 0.840847 0.007512 9 0.123104 0.260303 0.113664 10 0.912484 0.351629 Solution to A*x=b: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 5 6.000000 6 7.000000 7 8.000000 8 9.000000 9 10.000000 Solution to A'*x=b: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 5 6.000000 6 7.000000 7 8.000000 8 9.000000 9 10.000000 r83_np_fs_test(): r83_np_fs() factors and solves a tridiagonal linear system. Matrix order N = 10 Solution to A*x=b: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 5 6.000000 6 7.000000 7 8.000000 8 9.000000 9 10.000000 r83_np_ml_test(): r83_np_ml() computes A*x or A'*x where A has been factored by R83_FA. Matrix order N = 10 A*x and PLU*x: 0: 1.877437 1.877437 1: 2.278065 2.278065 2: 1.778664 1.778664 3: 5.113428 5.113428 4: 7.037162 7.037162 5: 6.239664 6.239664 6: 12.919612 12.919612 7: 6.889709 6.889709 8: 4.464199 4.464199 9: 11.728640 11.728640 A'*x and (PLU)'*x 0: 1.357152 1.357152 1: 4.399039 4.399039 2: 6.035186 6.035186 3: 5.597775 5.597775 4: 5.815246 5.815246 5: 6.745706 6.745706 6: 7.505409 7.505409 7: 12.929057 12.929057 8: 14.260734 14.260734 9: 9.794477 9.794477 r83_np_sl_test(): r83_np_sl() solves a linear system that was factored by R83_NP_FA. Matrix order N = 10 The tridiagonal matrix: Col: 1 2 3 4 5 Row --- 1 0.218418 0.829509 2 0.956318 0.561695 0.066119 3 0.415307 0.257578 0.043829 4 0.109957 0.633966 0.449539 5 0.061727 0.401306 6 0.754673 Col: 6 7 8 9 10 Row --- 5 0.797287 6 0.001838 0.350752 7 0.897504 0.094545 0.859097 8 0.013617 0.840847 0.007512 9 0.123104 0.260303 0.113664 10 0.912484 0.351629 Solution to A*x=b: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 5 6.000000 6 7.000000 7 8.000000 8 9.000000 9 10.000000 Solution to A'*x=b: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 5 6.000000 6 7.000000 7 8.000000 8 9.000000 9 10.000000 r83_np_test(): Normal end of execution. 15 August 2022 07:11:23 PM