20 January 2017 11:24:55 AM LINPLUS_PRB C version Test the LINPLUS library. 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 I4_MAX_TEST I4_MAX returns the maximum of two I4's. A B C=I4_MAX(A,B) -57 92 92 66 12 66 -17 -87 -17 -49 -78 -49 -92 27 27 -88 -10 -10 -20 51 51 60 -100 60 80 -30 80 -81 -98 -81 I4_MIN_TEST I4_MIN returns the minimum of two I4's. A B C=I4_MIN(A,B) -57 92 -57 66 12 12 -17 -87 -87 -49 -78 -78 -92 27 -92 -88 -10 -88 -20 51 -20 60 -100 -100 80 -30 -30 -81 -98 -98 I4_POWER_TEST I4_POWER computes I^J I J I4_POWER(I,J) 0 1 0 1 2 1 2 3 8 3 3 27 10 3 1000 -1 4 1 -2 5 -32 I4_UNIFORM_TEST I4_UNIFORM_AB computes pseudorandom values in an interval [A,B]. The lower endpoint A = -100 The upper endpoint B = 200 The initial seed is 123456789 1 -35 2 187 3 149 4 69 5 25 6 -81 7 -23 8 -67 9 -87 10 90 11 -82 12 35 13 20 14 127 15 139 16 -100 17 170 18 5 19 -72 20 -96 I4VEC_PRINT_TEST I4VEC_PRINT prints an I4VEC Here is the I4VEC: 0: 91 1: 92 2: 93 3: 94 R8_MAX_TEST: R8_MAX returns the maximum of two R8's. A B C=R8_MAX(A,B) -2.8158 4.5632 4.5632 3.2951 0.6170 3.2951 -0.8469 -4.3388 -0.8469 -2.4242 -3.9004 -2.4242 -4.5617 1.3397 1.3397 -4.3827 -0.5046 -0.5046 -0.9869 2.5467 2.5467 2.9729 -4.9816 2.9729 3.9750 -1.4925 3.9750 -4.0546 -4.8638 -4.0546 R8_SIGN_TEST: R8_SIGN returns the sign of a number. X R8_SIGN(X) -1.2500 -1 -0.2500 -1 0.0000 1 0.5000 1 9.0000 1 R8_UNIFORM_01_TEST: R8_UNIFORM_01 samples a uniform random distribution in [0,1]. distributed random numbers. Using initial random number seed = 123456789 First few values: 0 0.218418 1 0.956318 2 0.829509 3 0.561695 4 0.415307 5 0.0661187 6 0.257578 7 0.109957 8 0.043829 9 0.633966 Number of samples was 1000 Minimum value was 0.00183837 Maximum value was 0.997908 Average value was 0.50304 Variance was 0.082332 R8_UNIFORM_AB_TEST: R8_UNIFORM_AB produces a random real in a given range. Using range 10.000000 <= A <= 25.000000. I A 0 10.001996 1 13.542136 2 22.679357 3 21.955784 4 10.855646 5 20.834593 6 21.996377 7 18.110503 8 18.220583 9 23.346688 R8GE_CG_TEST: R8GE_CG applies CG to an R8GE matrix. Number of variables N = 10 Norm of residual ||Ax-b|| = 8.47455e-16 Norm of error ||x1-x2|| = 4.1616e-16 R8GE_CO_TEST: R8GE_CO estimates the condition number. Matrix order N = 4 The L1 condition number is 10 The R8GE_CO estimate is 7 R8GE_DET_TEST R8GE_DET, determinant of an R8GE matrix. R8GE_DET computes the determinant = 112 Correct determinant = 112 R8GE_DIF2_TEST R8GE_DIF2 sets up the second difference matrix. Matrix rows M = 7 Matrix columns N = 5 The second difference matrix: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 0 -1 2 -1 5 0 0 0 -1 2 6 0 0 0 0 -1 7 0 0 0 0 0 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 of A: 0 0.250000 1 0.266667 2 0.267857 3 0.287179 4 0.290179 5 0.290532 6 0.292202 7 0.292601 8 0.292666 R8GE_FA_TEST R8GE_FA factors a general linear system so that R8GE_SL can solve the factored system. Matrix order N = 5 Random matrix A: Col: 1 2 3 4 5 Row --- 1 0.218418 0.0661187 0.0617272 0.00183837 0.859097 2 0.956318 0.257578 0.449539 0.897504 0.840847 3 0.829509 0.109957 0.401306 0.350752 0.123104 4 0.561695 0.043829 0.754673 0.0945448 0.00751236 5 0.415307 0.633966 0.797287 0.0136169 0.260303 Solution: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 Solution: 0 1.000000 1 1.000000 2 1.000000 3 1.000000 4 1.000000 Solution of transposed system: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 R8GE_FS_NEW_TEST R8GE_FS_NEW factors and solves a linear system. Matrix order N = 10 Solution: 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 R8GE_FSS_TEST R8GE_FSS factors and solves multiple linear systems. Matrix order N = 10 Number of systems NB = 3 Solutions: 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_FSS_NEW_TEST R8GE_FSS_NEW factors and solves multiple linear systems. Matrix order N = 10 Number of systems NB = 3 Solutions: 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 sets up the Hilbert matrix. Matrix rows M = 7 Matrix columns N = 5 The Hilbert matrix: Col: 1 2 3 4 5 Row --- 1 1 0.5 0.333333 0.25 0.2 2 0.5 0.333333 0.25 0.2 0.166667 3 0.333333 0.25 0.2 0.166667 0.142857 4 0.25 0.2 0.166667 0.142857 0.125 5 0.2 0.166667 0.142857 0.125 0.111111 6 0.166667 0.142857 0.125 0.111111 0.1 7 0.142857 0.125 0.111111 0.1 0.0909091 R8GE_HILBERT_INVERSE_TEST R8GE_HILBERT_INVERSE sets up the Hilbert matrix inverse. The Hilbert 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 The inverse Hilbert 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 C = 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 sets up the identity matrix. Matrix rows M = 7 Matrix columns N = 5 The identity matrix: Col: 1 2 3 4 5 Row --- 1 1 0 0 0 6480 2 0 0 0 0 -4200 3 0 0 0 0 -140 4 0 0 0 1 1680 5 0 0 1 0 -4200 6 0 1 0 0 2800 7 1 0 0 -2700 0.0909091 R8GE_ILU_TEST R8GE_ILU returns the ILU factors. 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 sets up an indicator matrix. Matrix rows M = 7 Matrix columns N = 5 The R8GE indicator matrix: Col: 1 2 3 4 5 Row --- 1 11 12 13 14 15 2 21 22 23 24 25 3 31 32 33 34 35 4 41 42 43 44 45 5 51 52 53 54 55 6 61 62 63 64 65 7 71 72 73 74 75 R8GE_INVERSE_TEST R8GE_INVERSE inverts a general 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 0 4 4.44089e-16 -1.11022e-16 1.11022e-16 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 0: 32.659651 32.659651 1: 30.761657 30.761657 2: 20.172970 20.172970 3: 24.112617 24.112617 4: 30.759727 30.759727 5: 32.734219 32.734219 6: 28.025246 28.025246 7: 28.309083 28.309083 8: 28.750123 28.750123 9: 17.314086 17.314086 A'*x and (PLU)'*x 0: 29.518040 29.518040 1: 34.253309 34.253309 2: 29.981306 29.981306 3: 25.981850 25.981850 4: 28.713293 28.713293 5: 28.372974 28.372974 6: 33.487236 33.487236 7: 26.612402 26.612402 8: 24.841412 24.841412 9: 26.538970 26.538970 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-transpose-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 Row --- 1 1 0 0 2 1 1 0 3 1 2 1 4 1 3 3 C = A'*B: Col: 1 2 3 Row --- 1 4 6 4 2 6 14 11 3 4 11 10 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: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 Vector b = A'*x: 0 565.000000 1 580.000000 2 595.000000 3 610.000000 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 0: 0.535837 0.535837 1: 2.820090 2.820090 2: 2.253342 2.253342 3: 2.913374 2.913374 4: 4.075099 4.075099 Matrix rows M = 5 Matrix columns N = 3 A'*x and (PLU)'*x 0: 3.295367 3.295367 1: 4.241668 4.241668 2: 6.821908 6.821908 Matrix rows M = 3 Matrix columns N = 5 A*x and PLU*x 0: 5.993799 5.993799 1: 8.775200 8.775200 2: 5.780772 5.780772 Matrix rows M = 3 Matrix columns N = 5 A'*x and (PLU)'*x 0: 1.847872 1.847872 1: 2.659908 2.659908 2: 3.221329 3.221329 3: 4.060772 4.060772 4: 3.507907 3.507907 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: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 Vector b = A*x: 0 130.000000 1 230.000000 2 330.000000 3 430.000000 4 530.000000 R8GE_PLU_TEST R8GE_PLU returns the PLU factors of a matrix. Matrix rows M = 5 Matrix columns N = 4 Matrix A: Col: 1 2 3 4 Row --- 1 0.218418 0.0661187 0.0617272 0.00183837 2 0.956318 0.257578 0.449539 0.897504 3 0.829509 0.109957 0.401306 0.350752 4 0.561695 0.043829 0.754673 0.0945448 5 0.415307 0.633966 0.797287 0.0136169 Factor P: Col: 1 2 3 4 5 Row --- 1 0 0 0 0 1 2 1 0 0 0 0 3 0 0 0 1 0 4 0 0 1 0 0 5 0 1 0 0 0 Factor L: Col: 1 2 3 4 5 Row --- 1 1 0 0 0 0 2 0.434277 1 0 0 0 3 0.587352 -0.20582 1 0 0 4 0.867399 -0.217324 0.231419 1 0 5 0.228395 0.0139612 -0.0803036 0 1 Factor U: Col: 1 2 3 4 Row --- 1 0.956318 0.257578 0.449539 0.897504 2 0 0.522106 0.602062 -0.376149 3 0 0 0.614552 -0.510026 4 0 0 0 -0.391459 5 0 0 0 -0.238853 Product P*L*U: Col: 1 2 3 4 Row --- 1 0.218418 0.0661187 0.0617272 0.00183837 2 0.956318 0.257578 0.449539 0.897504 3 0.829509 0.109957 0.401306 0.350752 4 0.561695 0.043829 0.754673 0.0945448 5 0.415307 0.633966 0.797287 0.0136169 R8GE_POLY_TEST R8GE_POLY computes the characteristic polynomial. Matrix order N = 12 I, P(I), True P(I) 0: 1.000000 1.000000 1: -23.000000 -23.000000 2: 231.000000 231.000000 3: -1330.000000 -1330.000000 4: 4845.000000 4845.000000 5: -11628.000000 -11628.000000 6: 18564.000000 18564.000000 7: -19448.000000 -19448.000000 ...... .............. .............. 12: 1.000000 1.000000 R8GE_PRINT_TEST R8GE_PRINT prints an R8GE matrix. The 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. Rows 2:4, Cols 1:2: Col: 1 2 Row --- 2 21 22 3 31 32 4 41 42 R8GE_RANDOM_TEST R8GE_RANDOM sets up a random matrix. Matrix rows M = 7 Matrix columns N = 5 The random matrix: Col: 1 2 3 4 5 Row --- 1 0.218418 0.109957 0.797287 0.840847 0.822887 2 0.956318 0.043829 0.00183837 0.123104 0.267132 3 0.829509 0.633966 0.897504 0.00751236 0.692066 4 0.561695 0.0617272 0.350752 0.260303 0.561662 5 0.415307 0.449539 0.0945448 0.912484 0.861216 6 0.0661187 0.401306 0.0136169 0.113664 0.453794 7 0.257578 0.754673 0.859097 0.351629 0.911977 R8GE_RES_TEST R8GE_RES computes b-A*x, where A is an R8GE matrix. We check three cases, MN. Residual A*x-b: 0 0.000000 1 0.000000 2 0.000000 Residual A*x-b: 0 0.000000 1 0.000000 2 0.000000 3 0.000000 4 0.000000 Residual A*x-b: 0 0.000000 1 0.000000 2 0.000000 3 0.000000 4 0.000000 R8GE_SL_IT_TEST R8GE_SL_IT applies one step of iterative refinement to an R8GE_SL solution. Matrix order N = 6 i, x, b-A*x 0: 0.166667 0.000000 1: 0.142857 -0.000000 2: 0.125000 0.000000 3: 0.111111 0.000000 4: 0.100000 0.000000 5: 0.090909 -0.000000 Iterative refinement step 1 i, x, b-A*x 0: 0.166667 0.000000 1: 0.142857 -0.000000 2: 0.125000 0.000000 3: 0.111111 0.000000 4: 0.100000 0.000000 5: 0.090909 -0.000000 Iterative refinement step 2 i, x, b-A*x 0: 0.166667 0.000000 1: 0.142857 -0.000000 2: 0.125000 0.000000 3: 0.111111 0.000000 4: 0.100000 0.000000 5: 0.090909 -0.000000 Iterative refinement step 3 i, x, b-A*x 0: 0.166667 0.000000 1: 0.142857 -0.000000 2: 0.125000 0.000000 3: 0.111111 0.000000 4: 0.100000 0.000000 5: 0.090909 -0.000000 Iterative refinement step 4 i, x, b-A*x 0: 0.166667 0.000000 1: 0.142857 -0.000000 2: 0.125000 0.000000 3: 0.111111 -0.000000 4: 0.100000 0.000000 5: 0.090909 -0.000000 Iterative refinement step 5 i, x, b-A*x 0: 0.166667 0.000000 1: 0.142857 -0.000000 2: 0.125000 0.000000 3: 0.111111 0.000000 4: 0.100000 0.000000 5: 0.090909 -0.000000 R8GE_SL_NEW_TEST R8GE_SL_NEW solves a linear system that has been factored by R8GE_FA. Matrix order N = 5 Random matrix A: Col: 1 2 3 4 5 Row --- 1 0.218418 0.0661187 0.0617272 0.00183837 0.859097 2 0.956318 0.257578 0.449539 0.897504 0.840847 3 0.829509 0.109957 0.401306 0.350752 0.123104 4 0.561695 0.043829 0.754673 0.0945448 0.00751236 5 0.415307 0.633966 0.797287 0.0136169 0.260303 Solution: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 Solution: 0 1.000000 1 1.000000 2 1.000000 3 1.000000 4 1.000000 Solution of transposed system: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 R8GE_TO_R8VEC_TEST R8GE_TO_R8VEC converts an R8GE matrix to an R8VEC. Matrix rows M = 4 Matrix columns N = 6 The R8GE indicator matrix: Col: 1 2 3 4 5 Row --- 1 11 12 13 14 15 2 21 22 23 24 25 3 31 32 33 34 35 4 41 42 43 44 45 Col: 6 Row --- 1 16 2 26 3 36 4 46 0 0 0 11 1 0 1 21 2 0 2 31 3 0 3 41 0 1 4 12 1 1 5 22 2 1 6 32 3 1 7 42 0 2 8 13 1 2 9 23 2 2 10 33 3 2 11 43 0 3 12 14 1 3 13 24 2 3 14 34 3 3 15 44 0 4 16 15 1 4 17 25 2 4 18 35 3 4 19 45 0 5 20 16 1 5 21 26 2 5 22 36 3 5 23 46 R8GE_TRANSPOSE_PRINT_TEST R8GE_TRANSPOSE_PRINT prints an R8GE matrix, transposed. Matrix row order M = 7 Matrix column order N = 12 The transposed matrix A: Row: 0 1 2 3 4 Col 0: 101 201 301 401 501 1: 102 202 302 402 502 2: 103 203 303 403 503 3: 104 204 304 404 504 4: 105 205 305 405 505 5: 106 206 306 406 506 6: 107 207 307 407 507 7: 108 208 308 408 508 8: 109 209 309 409 509 9: 110 210 310 410 510 10: 111 211 311 411 511 11: 112 212 312 412 512 Row: 5 6 Col 0: 601 701 1: 602 702 2: 603 703 3: 604 704 4: 605 705 5: 606 706 6: 607 707 7: 608 708 8: 609 709 9: 610 710 10: 611 711 11: 612 712 R8GE_TRANSPOSE_PRINT_SOME_TEST R8GE_TRANSPOSE_PRINT_SOME prints some of an R8GE matrix, transposed. Matrix row order M = 7 Matrix column order N = 12 Rows 3:5, Cols 4:8: Row: 2 3 4 Col 3: 304 404 504 4: 305 405 505 5: 306 406 506 6: 307 407 507 7: 308 408 508 R8GE_TRF_TEST R8GE_TRF computes the LU factors of an R8GE matrix to that R8GE_TRS can solve the factored system. Matrix rows M = 5 Matrix columns N = 5 Solution: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 Solution to transposed system: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 R8GE_TRS_TEST R8GE_TRS solves a linear system that was factored by R8GE_TRF. Matrix rows M = 5 Matrix columns N = 5 Solution: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 Solution to transposed system: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 R8GE_ZEROS_NEW_TEST R8GE_ZEROS_NEW returns a zeroed out 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_DOT_PRODUCT_TEST R8VEC_DOT_PRODUCT computes the dot product of two R8VEC's. V1 and V2: 0: 0.218418 0.0617272 1: 0.956318 0.449539 2: 0.829509 0.401306 3: 0.561695 0.754673 4: 0.415307 0.797287 5: 0.0661187 0.00183837 6: 0.257578 0.897504 7: 0.109957 0.350752 8: 0.043829 0.0945448 9: 0.633966 0.0136169 V1 dot V2 = 1.81393 R8VEC_INDICATOR1_NEW_TEST R8VEC_INDICATOR1_NEW returns an indicator vector. Indicator1 vector: 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 R8VEC_MAX_TEST R8VEC_MAX produces the maximum entry in a real array. The array: 0 0.218418 1 0.956318 2 0.829509 3 0.561695 4 0.415307 5 0.066119 6 0.257578 7 0.109957 8 0.043829 9 0.633966 R8VEC_MAX reports the maximum value is 0.956318. R8VEC_MEAN_TEST R8VEC_MEAN computes the mean of an R8VEC. Input vector: 0 0.218418 1 0.956318 2 0.829509 3 0.561695 4 0.415307 5 0.066119 6 0.257578 7 0.109957 8 0.043829 9 0.633966 Mean: 0.40927 R8VEC_MIN_TEST R8VEC_MIN produces the minimum entry. The array: 0 0.218418 1 0.956318 2 0.829509 3 0.561695 4 0.415307 5 0.066119 6 0.257578 7 0.109957 8 0.043829 9 0.633966 R8VEC_MIN reports the minimum value is 0.043829. R8VEC_NORM_TEST R8VEC_NORM computes the L2 norm of an R8VEC. The vector X: 0 0.218418 1 0.956318 2 0.829509 3 0.561695 4 0.415307 5 0.066119 6 0.257578 7 0.109957 8 0.043829 9 0.633966 R8VEC_NORM(X) = 1.62017 R8VEC_NORM_AFFINE_TEST R8VEC_NORM_AFFINE computes the L2 norm of the difference of two R8VECs. R8VEC_NORM_AFFINE(X,Y) = 1.22756 R8VEC_NORM(X-Y) = 1.22756 R8VEC_PRINT_TEST R8VEC_PRINT prints an R8VEC. The R8VEC: 0 123.456000 1 0.000005 2 -1000000.000000 3 3.141593 R8VEC_PRINT_SOME_TEST R8VEC_PRINT_SOME prints some of an R8VEC. No more than 10 lines of this R8VEC: 0: 1 1: 2 2: 3 3: 4 4: 5 5: 6 6: 7 7: 8 ........ .............. 99: 100 R8GE_TO_R8VEC_TEST R8GE_TO_R8VEC converts an R8GE matrix to an R8VEC vector. Corresponding R8VEC vector: 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 10 11.000000 11 12.000000 R8GE matrix: Col: 1 2 3 Row --- 1 1 6 11 2 2 7 12 3 3 9 1.02766e-321 4 5 10 6.32404e-322 R8VEC_UNIFORM_01_NEW_TEST R8VEC_UNIFORM_01_NEW returns a random R8VEC with entries in a given range [ 0.0, 1.0 ] Input SEED = 123456789 Random R8VEC: 0 0.218418 1 0.956318 2 0.829509 3 0.561695 4 0.415307 5 0.066119 6 0.257578 7 0.109957 8 0.043829 9 0.633966 Input SEED = 1361431000 Random R8VEC: 0 0.061727 1 0.449539 2 0.401306 3 0.754673 4 0.797287 5 0.001838 6 0.897504 7 0.350752 8 0.094545 9 0.013617 Input SEED = 29242052 Random R8VEC: 0 0.859097 1 0.840847 2 0.123104 3 0.007512 4 0.260303 5 0.912484 6 0.113664 7 0.351629 8 0.822887 9 0.267132 R8VEC_VARIANCE_TEST R8VEC_VARIANCE computes the variance of an R8VEC. Input vector: 0 0.218418 1 0.956318 2 0.829509 3 0.561695 4 0.415307 5 0.066119 6 0.257578 7 0.109957 8 0.043829 9 0.633966 Variance: 0.105549 R8VEC2_PRINT_TEST R8VEC2_PRINT prints a pair of R8VEC's. Squares and roots: 0: 15241.4 11.1111 1: 2.5e-11 0.00223607 2: 1e+12 -nan 3: 9.8696 1.77245 4: 0 0 R8VEC2_PRINT_SOME_TEST R8VEC2_PRINT_SOME prints some of a pair of R8VEC's. No more than 10 lines of two vectors: 0: 1.000000 1.000000 1: 4.000000 1.414214 2: 9.000000 1.732051 3: 16.000000 2.000000 4: 25.000000 2.236068 5: 36.000000 2.449490 6: 49.000000 2.645751 7: 64.000000 2.828427 ...... .............. .............. 99: 10000.000000 10.000000 R8GE_PRB Normal end of execution. 20 January 2017 11:24:55 AM