Sun May 24 13:41:18 2015 R8LIB_TEST Python version: Test the R8LIB library. AGM_VALUES_TEST: AGM_VALUES stores values of the arithmetic geometric mean function. A B AGM(A,B) 22.000000 96.000000 52.2746411987042379 83.000000 56.000000 68.8365300598585179 42.000000 7.000000 20.6593011967340097 26.000000 11.000000 17.6968548737436500 4.000000 63.000000 23.8670497217533004 6.000000 45.000000 20.7170159828059930 40.000000 75.000000 56.1278422556166845 80.000000 0.000000 0.0000000000000000 90.000000 35.000000 59.2695650812296364 9.000000 1.000000 3.9362355036495553 53.000000 53.000000 53.0000000000000000 1.000000 2.000000 1.4567910310469068 1.000000 4.000000 2.2430285802876027 1.000000 8.000000 3.6157561775973628 AGM_VALUES_TEST: Normal end of execution. GAMMA_VALUES: GAMMA_VALUES stores values of the Gamma function. X GAMMA(X) -0.500000 -3.5449077018110322 -0.010000 -100.5871979644108052 0.010000 99.4325851191506018 0.100000 9.5135076986687324 0.200000 4.5908437119988026 0.400000 2.2181595437576882 0.500000 1.7724538509055161 0.600000 1.4891922488128171 0.800000 1.1642297137253030 1.000000 1.0000000000000000 1.100000 0.9513507698668732 1.200000 0.9181687423997607 1.300000 0.8974706963062772 1.400000 0.8872638175030753 1.500000 0.8862269254527581 1.600000 0.8935153492876903 1.700000 0.9086387328532904 1.800000 0.9313837709802427 1.900000 0.9617658319073874 2.000000 1.0000000000000000 3.000000 2.0000000000000000 4.000000 6.0000000000000000 10.000000 362880.0000000000000000 20.000000 121645100408832000.0000000000000000 30.000000 8841761993739701898620088352768.0000000000000000 GAMMA_VALUES_TEST: Normal end of execution. GAMMA_LOG_VALUES: GAMMA_LOG_VALUES stores values of the logarithm of the Gamma function. X GAMMA_LOG(X) 0.200000 1.5240638224307841 0.400000 0.7966778177017837 0.600000 0.3982338580692348 0.800000 0.1520596783998375 1.000000 0.0000000000000000 1.100000 -0.0498724412598397 1.200000 -0.0853740900033158 1.300000 -0.1081748095078604 1.400000 -0.1196129141723712 1.500000 -0.1207822376352452 1.600000 -0.1125917656967557 1.700000 -0.0958076974070659 1.800000 -0.0710838729143722 1.900000 -0.0389842759230833 2.000000 0.0000000000000000 3.000000 0.6931471805599453 4.000000 1.7917594692280550 10.000000 12.8018274800814691 20.000000 39.3398841871994946 30.000000 71.2570389671680147 GAMMA_LOG_VALUES_TEST: Normal end of execution. 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_LOG_10_TEST Normal end of execution. I4_SIGN_TEST I4_SIGN returns the sign of an I4. I4 I4_SIGN(I4) -10 -1 -7 -1 0 1 5 1 9 1 I4_SIGN_TEST Normal end of execution. I4_UNIFORM_AB_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 I4_UNIFORM_AB_TEST: Normal end of execution. I4VEC_INDICATOR0_TEST I4VEC_INDICATOR0 returns an indicator vector. The indicator0 vector: 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 I4VEC_INDICATOR0_TEST Normal end of execution. I4VEC_INDICATOR1_TEST I4VEC_INDICATOR1 returns an indicator vector. The indicator1 vector: 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 I4VEC_INDICATOR1_TEST Normal end of execution. I4VEC_PRINT_TEST I4VEC_PRINT prints an I4VEC. Here is an I4VEC: 0 91 1 92 2 93 3 94 I4VEC_PRINT_TEST: Normal end of execution. I4VEC_TRANSPOSE_PRINT_TEST I4VEC_TRANSPOSE_PRINT prints an I4VEC with 5 entries to a row, and an optional title. My array: 1 2 3 4 5 6 7 8 9 10 11 12 I4VEC_TRANSPOSE_PRINT_TEST: Normal end of execution. PERM0_CHECK_TEST PERM0_CHECK checks a permutation of 0,...,N-1. Permutation 1: 5 2 3 4 1 PERM0_CHECK - Warning! Permutation is missing the value 0. Permutation 2: 4 1 3 0 2 Permutation 3: 0 2 1 3 2 PERM0_CHECK - Warning! Permutation is missing the value 4. PERM0_CHECK_TEST: Normal end of execution. PERM0_UNIFORM_TEST PERM0_UNIFORM randomly selects a permutation of 0,...,N-1. 2 9 8 6 3 5 7 4 0 1 6 1 5 2 8 4 0 9 3 7 0 1 8 2 4 5 7 9 3 6 3 8 4 7 0 9 2 5 6 1 1 7 5 4 0 6 8 2 3 9 PERM0_UNIFORM_TEST Normal end of execution. PERM1_CHECK_TEST PERM1_CHECK checks a permutation of 1,...,N. Permutation 1: 5 2 3 4 1 Permutation 2: 4 1 3 0 2 PERM1_CHECK - Warning! Permutation is missing the value 5. Permutation 3: 0 2 1 3 2 PERM1_CHECK - Warning! Permutation is missing the value 4. PERM1_CHECK_TEST: Normal end of execution. PERM1_UNIFORM_TEST PERM1_UNIFORM randomly selects a permutation of 1,...,N. 3 10 9 7 4 6 8 5 1 2 7 2 6 3 9 5 1 10 4 8 1 2 9 3 5 6 8 10 4 7 4 9 5 8 1 10 3 6 7 2 2 8 6 5 1 7 9 3 4 10 PERM1_UNIFORM_TEST Normal end of execution. R8_ABS_TEST R8_ABS returns the absolute value of an R8. X R8_ABS(X) -2.815817 2.815817 4.563176 4.563176 3.295092 3.295092 0.616954 0.616954 -0.846929 0.846929 -4.338813 4.338813 -2.424222 2.424222 -3.900432 3.900432 -4.561710 4.561710 1.339657 1.339657 R8_ABS_TEST Normal end of execution. R8_ACOS_TEST R8_ACOS computes the arc-cosine of an angle. C R8_ACOS(C) ACOS(C) -1.16667 3.14159 -1 3.14159 3.14159 -0.833333 2.55591 2.55591 -0.666667 2.30052 2.30052 -0.5 2.0944 2.0944 -0.333333 1.91063 1.91063 -0.166667 1.73824 1.73824 0 1.5708 1.5708 0.166667 1.40335 1.40335 0.333333 1.23096 1.23096 0.5 1.0472 1.0472 0.666667 0.841069 0.841069 0.833333 0.585686 0.585686 1 0 0 1.16667 0 R8_ACOS_TEST Normal end of execution. R8_ACOSH_TEST R8_ACOSH computes the arc-hyperbolic-cosine of an angle. X A=R8_ACOSH(X) COSH(A) 1 0 1 1.5 0.962424 1.5 2 1.31696 2 2.5 1.5668 2.5 3 1.76275 3 3.5 1.92485 3.5 4 2.06344 4 4.5 2.18464 4.5 5 2.29243 5 R8_ACOSH_TEST Normal end of execution. R8_ADD_TEST R8_ADD adds two R8's. R1 R2 R3 R4 R1+R2 R8_ADD(R1,R2) -281.582 456.318 174.736 174.736 329.509 61.6954 391.205 391.205 -84.6929 -433.881 -518.574 -518.574 -242.422 -390.043 -632.465 -632.465 -456.171 133.966 -322.205 -322.205 R8_ADD_TEST Normal end of execution. R8_AGM_TEST: R8_AGM computes the arithmetic geometric mean. X Y AGM AGM Exact Computed 22.000000 96.000000 52.27464119870424 52.27464119870424 83.000000 56.000000 68.83653005985852 68.83653005985852 42.000000 7.000000 20.65930119673401 20.65930119673401 26.000000 11.000000 17.69685487374365 17.69685487374367 4.000000 63.000000 23.8670497217533 23.8670497217533 6.000000 45.000000 20.71701598280599 20.71701598280599 40.000000 75.000000 56.12784225561668 56.12784225561668 80.000000 0.000000 0 0 90.000000 35.000000 59.26956508122964 59.26956508122989 9.000000 1.000000 3.936235503649555 3.936235503649556 53.000000 53.000000 53 53 1.000000 2.000000 1.456791031046907 1.456791031046907 1.000000 4.000000 2.243028580287603 2.243028580287603 1.000000 8.000000 3.615756177597363 3.615756177597363 R8_AGM_TEST Normal end of execution. R8_ASINH_TEST R8_ASINH computes the inverse hyperbolic sine. X R8_ASINH(X) SINH(R8_SINH(X)) 1.000000 0.881374 1.000000 1.200000 1.015973 1.200000 1.400000 1.137982 1.400000 1.600000 1.248983 1.600000 1.800000 1.350441 1.800000 2.000000 1.443635 2.000000 2.200000 1.529660 2.200000 2.400000 1.609438 2.400000 2.600000 1.683743 2.600000 2.800000 1.753229 2.800000 R8_ASINH_TEST Normal end of execution. R8_ATAN_TEST R8_ATAN computes the arc-tangent given Y and X; ATAN2 is the system version of this routine. X Y ATAN2(Y,X) R8_ATAN(Y,X) 1.000000 0.000000 0.000000 0.000000 1.000000 1.000000 0.785398 0.785398 0.000000 1.000000 1.570796 1.570796 -1.000000 1.000000 2.356194 2.356194 -1.000000 0.000000 3.141593 3.141593 -1.000000 -1.000000 -2.356194 3.926991 0.000000 -1.000000 -1.570796 4.712389 1.000000 -1.000000 -0.785398 5.497787 R8_ATAN_TEST Normal end of execution R8_ATANH_TEST R8_ATANH computes the inverse hyperbolic tangent. X R8_ATANH(X) TANH(R8_TANH(X)) -0.200000 -0.202733 -0.200000 -0.100000 -0.100335 -0.100000 0.000000 0.000000 0.000000 0.100000 0.100335 0.100000 0.200000 0.202733 0.200000 0.300000 0.309520 0.300000 0.400000 0.423649 0.400000 0.500000 0.549306 0.500000 0.600000 0.693147 0.600000 0.700000 0.867301 0.700000 0.800000 1.098612 0.800000 0.900000 1.472219 0.900000 R8_ATANH_TEST Normal end of execution. R8_BIG_TEST R8_BIG returns a "big" R8; R8_BIG = 1e+30 R8_BIG_TEST Normal end of execution. R8_CAS_TEST R8_CAS evaluates the casine of a number. X R8_CAS ( X ) 0.000000 1.000000 0.261799 1.224745 0.523599 1.366025 0.785398 1.414214 1.047198 1.366025 1.308997 1.224745 1.570796 1.000000 1.832596 0.707107 2.094395 0.366025 2.356194 0.000000 2.617994 -0.366025 2.879793 -0.707107 3.141593 -1.000000 R8_CAS_TEST Normal end of execution. R8_CEILING_TEST R8_CEILING rounds a value up. X R8_CEILING(X) -1.200000 -1 -1.000000 -1 -0.800000 0 -0.600000 0 -0.400000 0 -0.200000 0 0.000000 0 0.200000 1 0.400000 1 0.600000 1 0.800000 1 1.000000 1 1.200000 2 R8_CEILING_TEST Normal end of execution. R8_CHOOSE_TEST R8_CHOOSE evaluates C(N,K). N K CNK 0 0 1 1 0 1 1 1 1 2 0 1 2 1 2 2 2 1 3 0 1 3 1 3 3 2 3 3 3 1 4 0 1 4 1 4 4 2 6 4 3 4 4 4 1 5 0 1 5 1 5 5 2 10 5 3 10 5 4 5 5 5 1 R8_CHOOSE_TEST Normal end of execution. R8_COSD_TEST R8_COSD computes the cosine of an angle given in degrees. ANGLE R8_COSD(ANGLE) 0.00 1 15.00 0.965926 30.00 0.866025 45.00 0.707107 60.00 0.5 75.00 0.258819 90.00 6.12323e-17 105.00 -0.258819 120.00 -0.5 135.00 -0.707107 150.00 -0.866025 165.00 -0.965926 180.00 -1 195.00 -0.965926 210.00 -0.866025 225.00 -0.707107 240.00 -0.5 255.00 -0.258819 270.00 -1.83697e-16 285.00 0.258819 300.00 0.5 315.00 0.707107 330.00 0.866025 345.00 0.965926 360.00 1 R8_COSD_TEST Normal end of execution. R8_COTD_TEST R8_COTD computes the cotangent of an angle given in degrees. ANGLE R8_COTD(ANGLE) 0.00 Undefined 15.00 3.73205 30.00 1.73205 45.00 1 60.00 0.57735 75.00 0.267949 90.00 6.12323e-17 105.00 -0.267949 120.00 -0.57735 135.00 -1 150.00 -1.73205 165.00 -3.73205 180.00 Undefined 195.00 3.73205 210.00 1.73205 225.00 1 240.00 0.57735 255.00 0.267949 270.00 1.83697e-16 285.00 -0.267949 300.00 -0.57735 315.00 -1 330.00 -1.73205 345.00 -3.73205 360.00 Undefined R8_COTD_TEST Normal end of execution. R8_CSCD_TEST R8_CSCD computes the cosecant of an angle given in degrees. ANGLE R8_CSCD(ANGLE) 0.00 Undefined 15.00 3.8637 30.00 2 45.00 1.41421 60.00 1.1547 75.00 1.03528 90.00 1 105.00 1.03528 120.00 1.1547 135.00 1.41421 150.00 2 165.00 3.8637 180.00 Undefined 195.00 -3.8637 210.00 -2 225.00 -1.41421 240.00 -1.1547 255.00 -1.03528 270.00 -1 285.00 -1.03528 300.00 -1.1547 315.00 -1.41421 330.00 -2 345.00 -3.8637 360.00 Undefined R8_CSCD_TEST Normal end of execution. R8_CUBE_ROOT_TEST R8_CUBE_ROOT computes the cube root of an R8. X Y Y^3 -5.63163 -1.77915 -5.63163 9.12635 2.08977 9.12635 6.59018 1.87485 6.59018 1.23391 1.07258 1.23391 -1.69386 -1.19204 -1.69386 -8.67763 -2.05495 -8.67763 -4.84844 -1.69252 -4.84844 -7.80086 -1.98327 -7.80086 -9.12342 -2.08955 -9.12342 2.67931 1.38891 2.67931 R8_CUBE_ROOT_TEST Normal end of execution. R8_DIFF_TEST R8_DIFF computes a difference X-Y to a given number of binary places. For this test, we use 3 binary places. X Y X-Y R8_DIFF(X,Y) 1.000000 0.062500 0.937500 0.875000 1.000000 0.125000 0.875000 0.875000 1.000000 0.250000 0.750000 0.750000 1.000000 0.500000 0.500000 0.500000 1.000000 0.874000 0.126000 0.125000 1.000000 0.876000 0.124000 0.125000 1.000000 0.900000 0.100000 0.125000 1.000000 0.950000 0.050000 0.000000 1.000000 0.990000 0.010000 0.000000 1.000000 1.000000 0.000000 0.000000 1.000000 1.010000 -0.010000 0.000000 1.000000 1.050000 -0.050000 0.000000 1.000000 1.100000 -0.100000 -0.137500 1.000000 3.000000 -2.000000 -1.875000 1.000000 10.000000 -9.000000 -8.750000 R8_DIFF_TEST Normal end of execution. R8_DIGIT_TEST R8_DIGIT extracts decimal digits. Here, we get digits of 3.14159 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 R8_DIGIT_TEST Normal end of execution. R8_E_TEST R8_E returns the value of E. Compare E to (1+1/n)^n R8_E = 2.71828 N Estimate Error 1 2 0.718282 2 2.25 0.468282 4 2.44141 0.276876 8 2.56578 0.152497 16 2.63793 0.0803533 32 2.67699 0.0412917 64 2.69734 0.0209369 128 2.70774 0.0105428 256 2.71299 0.0052902 512 2.71563 0.00264983 1024 2.71696 0.0013261 2048 2.71762 0.000663346 4096 2.71795 0.000331747 8192 2.71812 0.000165892 16384 2.7182 8.29507e-05 32768 2.71824 4.14765e-05 65536 2.71826 2.07386e-05 131072 2.71827 1.03693e-05 262144 2.71828 5.18469e-06 524288 2.71828 2.59235e-06 1048576 2.71828 1.29618e-06 R8_E_TEST Normal end of execution. R8_EPSILON_TEST R8_EPSILON produces the R8 roundoff unit. R = R8_EPSILON() = 2.220446e-16 ( 1 + R ) - 1 = 2.220446e-16 ( 1 + (R/2) ) - 1 = 0.000000e+00 R8_EPSILON_TEST Normal end of execution. R8_EPSILON_COMPUTE_TEST R8_EPSILON_COMPUTE computes the R8 roundoff unit. R = R8_EPSILON_COMPUTE() = 2.220446e-16 ( 1 + R ) - 1 = 2.220446e-16 ( 1 + (R/2) ) - 1 = 0.000000e+00 R8_EPSILON_COMPUTE_TEST Normal end of execution. R8_FACTORIAL_TEST R8_FACTORIAL evaluates the factorial function. N Exact Computed 0 1 1 1 1 1 2 2 2 3 6 6 4 24 24 5 120 120 6 720 720 7 5040 5040 8 40320 40320 9 362880 362880 10 3628800 3628800 11 39916800 39916800 12 479001600 479001600 13 6227020800 6227020800 14 87178291200 87178291200 15 1307674368000 1307674368000 16 20922789888000 20922789888000 17 355687428096000 355687428096000 18 6402373705728000 6402373705728000 19 1.21645100408832e+17 1.21645100408832e+17 20 2.43290200817664e+18 2.43290200817664e+18 25 1.551121004333099e+25 1.551121004333099e+25 50 3.041409320171338e+64 3.041409320171338e+64 100 9.332621544394415e+157 9.33262154439441e+157 150 5.713383956445855e+262 5.71338395644585e+262 R8_FACTORIAL_TEST Normal end of execution. R8_FACTORIAL_VALUES_TEST: R8_FACTORIAL_VALUES returns values of the real factorial function. N R8_FACTORIAL(N) 0 1 1 1 2 2 3 6 4 24 5 120 6 720 7 5040 8 40320 9 362880 10 3.6288e+06 11 3.99168e+07 12 4.79002e+08 13 6.22702e+09 14 8.71783e+10 15 1.30767e+12 16 2.09228e+13 17 3.55687e+14 18 6.40237e+15 19 1.21645e+17 20 2.4329e+18 25 1.55112e+25 50 3.04141e+64 100 9.33262e+157 150 5.71338e+262 R8_FACTORIAL_VALUES_TEST: Normal end of execution. R8_FACTORIAL2_TEST R8_FACTORIAL2 evaluates the double factorial function. N Exact Computed 0 1 1 1 1 1 2 2 2 3 3 3 4 8 8 5 15 15 6 48 48 7 105 105 8 384 384 9 945 945 10 3840 3840 11 10395 10395 12 46080 46080 13 135135 135135 14 645120 645120 15 2027025 2027025 R8_FACTORIAL2_TEST Normal end of execution. R8_FACTORIAL2_VALUES_TEST: R8_FACTORIAL2_VALUES returns values of the double factorial function. N N!! 0 1 1 1 2 2 3 3 4 8 5 15 6 48 7 105 8 384 9 945 10 3840 11 10395 12 46080 13 135135 14 645120 15 2.02702e+06 R8_FACTORIAL2_VALUES_TEST: Normal end of execution. R8_FALL_TEST R8_FALL evaluates the falling factorial Fall(X,N). X N Exact Computed 5 4 120 120 5.25 4 163.16015625 163.16015625 5.5 4 216.5625 216.5625 5.75 4 281.66015625 281.66015625 6 4 360 360 7.5 0 1 1 7.5 1 7.5 7.5 7.5 2 48.75 48.75 7.5 3 268.125 268.125 7.5 4 1206.5625 1206.5625 7.5 5 4222.96875 4222.96875 7.5 6 10557.421875 10557.421875 7.5 7 15836.1328125 15836.1328125 7.5 8 7918.06640625 7918.06640625 7.5 9 -3959.033203125 -3959.033203125 R8_FALL_TEST Normal end of execution. R8_FALL_VALUES_TEST: R8_FALL_VALUES returns values of the falling factorial. X N R8_FALL(X,N) 5.0000 4 120 5.2500 4 163.16015625 5.5000 4 216.5625 5.7500 4 281.66015625 6.0000 4 360 7.5000 0 1 7.5000 1 7.5 7.5000 2 48.75 7.5000 3 268.125 7.5000 4 1206.5625 7.5000 5 4222.96875 7.5000 6 10557.421875 7.5000 7 15836.1328125 7.5000 8 7918.06640625 7.5000 9 -3959.033203125 R8_FALL_VALUES_TEST: Normal end of execution. R8_FRACTIONAL_TEST R8_FRACTIONAL returns the fractional part of an R8. X R8_FRACTIONAL(X) -1.252654 0.252654 4.650541 0.650541 3.636074 0.636074 1.493564 0.493564 0.322457 0.322457 -2.471050 0.471050 -0.939378 0.939378 -2.120346 0.120346 -2.649368 0.649368 2.071726 0.071726 R8_FRACTIONAL_TEST Normal end of execution. R8_GAMMA_TEST: R8_GAMMA evaluates the Gamma function. X GAMMA(X) R8_GAMMA(X) -0.5 -3.544907701811032 -3.544907701811032 -0.01 -100.5871979644108 -100.5871979644108 0.01 99.4325851191506 99.4325851191506 0.1 9.513507698668732 9.513507698668731 0.2 4.590843711998803 4.590843711998803 0.4 2.218159543757688 2.218159543757688 0.5 1.772453850905516 1.772453850905516 0.6 1.489192248812817 1.489192248812817 0.8 1.164229713725303 1.164229713725303 1 1 1 1.1 0.9513507698668732 0.9513507698668732 1.2 0.9181687423997607 0.9181687423997607 1.3 0.8974706963062772 0.8974706963062772 1.4 0.8872638175030753 0.8872638175030754 1.5 0.8862269254527581 0.8862269254527581 1.6 0.8935153492876903 0.8935153492876903 1.7 0.9086387328532904 0.9086387328532904 1.8 0.9313837709802427 0.9313837709802427 1.9 0.9617658319073874 0.9617658319073874 2 1 1 3 2 2 4 6 6 10 362880 362880 20 1.21645100408832e+17 1.216451004088321e+17 30 8.841761993739702e+30 8.841761993739751e+30 R8_GAMMA_TEST Normal end of execution. R8_GAMMA_LOG_TEST: R8_GAMMA_LOG evaluates the logarithm of the Gamma function. X GAMMA_LOG(X) R8_GAMMA_LOG(X) 0.2 1.524063822430784 1.524063822430784 0.4 0.7966778177017837 0.7966778177017837 0.6 0.3982338580692348 0.3982338580692349 0.8 0.1520596783998375 0.1520596783998376 1 0 0 1.1 -0.04987244125983972 -0.04987244125983976 1.2 -0.08537409000331583 -0.08537409000331585 1.3 -0.1081748095078604 -0.1081748095078605 1.4 -0.1196129141723712 -0.1196129141723713 1.5 -0.1207822376352452 -0.1207822376352453 1.6 -0.1125917656967557 -0.1125917656967558 1.7 -0.09580769740706586 -0.09580769740706586 1.8 -0.07108387291437215 -0.07108387291437215 1.9 -0.03898427592308333 -0.03898427592308337 2 0 0 3 0.6931471805599453 0.6931471805599454 4 1.791759469228055 1.791759469228055 10 12.80182748008147 12.80182748008147 20 39.33988418719949 39.33988418719949 30 71.25703896716801 71.257038967168 R8_GAMMA_LOG_TEST Normal end of execution. R8_HUGE_TEST R8_HUGE returns a "huge" R8; R8_HUGE = 1.79769e+308 R8_HUGE_TEST Normal end of execution. R8_LOG_2_TEST R8_LOG_2 computes the logarithm base 2. X R8_LOG_2 0.000000 -inf 1.000000 0.000000 2.000000 1.000000 3.000000 1.584963 9.000000 3.169925 10.000000 3.321928 11.000000 3.459432 99.000000 6.629357 101.000000 6.658211 -1.000000 0.000000 -2.000000 1.000000 -3.000000 1.584963 -9.000000 3.169925 0.500000 -1.000000 0.330000 -1.599462 0.250000 -2.000000 0.200000 -2.321928 0.010000 -6.643856 R8_LOG_2_TEST Normal end of execution. R8_LOG_B_TEST R8_LOG_B computes the logarithm base B. X B R8_LOG_B 16.000000 2.000000 4.000000 16.000000 3.000000 2.523719 16.000000 4.000000 2.000000 16.000000 5.000000 1.722706 16.000000 6.000000 1.547411 16.000000 7.000000 1.424829 16.000000 8.000000 1.333333 16.000000 16.000000 1.000000 16.000000 32.000000 0.800000 16.000000 256.000000 0.500000 R8_LOG_B_TEST Normal end of execution. R8_MANT_TEST R8_MANT decomposes a value. Number to be decomposed: -314.159 R8_MANT: X = -1 * 1.227184 * 2^ 8 R8_MANT_TEST Normal end of execution. R8_MAX_TEST R8_MAX computes the maximum of two R8's. A B C=R8_MAX(A,B) -5.63163 9.12635 9.12635 6.59018 1.23391 6.59018 -1.69386 -8.67763 -1.69386 -4.84844 -7.80086 -4.84844 -9.12342 2.67931 2.67931 -8.76546 -1.00922 -1.00922 -1.97387 5.09347 5.09347 5.94574 -9.96323 5.94574 7.95008 -2.98495 7.95008 -8.1091 -9.72766 -8.1091 R8_MAX_TEST: Normal end of execution. R8_MIN_TEST R8_MIN computes the minimum of two R8's. A B C=R8_MIN(A,B) -5.63163 9.12635 -5.63163 6.59018 1.23391 1.23391 -1.69386 -8.67763 -8.67763 -4.84844 -7.80086 -7.80086 -9.12342 2.67931 -9.12342 -8.76546 -1.00922 -8.76546 -1.97387 5.09347 -1.97387 5.94574 -9.96323 -9.96323 7.95008 -2.98495 -2.98495 -8.1091 -9.72766 -9.72766 R8_MIN_TEST: Normal end of execution. R8_MOD_TEST R8_MOD returns the remainder after division. X Y (X%Y) R8_MOD(X,Y) -5.631634 9.126352 3.494717 -5.631634 6.590185 1.233909 0.420640 0.420640 -1.693858 -8.677625 -1.693858 -1.693858 -4.848444 -7.800864 -4.848444 -4.848444 -9.123420 2.679314 1.593837 -1.085477 -8.765455 -1.009221 -0.691689 -0.691689 -1.973874 5.093470 3.119595 -1.973874 5.945739 -9.963233 -4.017493 5.945739 7.950081 -2.984953 -1.004779 1.980175 -8.109105 -9.727662 -8.109105 -8.109105 R8_MOD_TEST Normal end of execution. R8_MODP_TEST R8_MODP returns the remainder after division. Unlike the MATLAB MOD, R8_MODP ( X, Y ) is positive. X Y MOD(X,Y) R8_MODP(X,Y) -5.631634 9.126352 3.494717 3.494717 6.590185 1.233909 0.420640 0.420640 -1.693858 -8.677625 -1.693858 6.983767 -4.848444 -7.800864 -4.848444 2.952420 -9.123420 2.679314 1.593837 1.593837 -8.765455 -1.009221 -0.691689 0.317532 -1.973874 5.093470 3.119595 3.119595 5.945739 -9.963233 -4.017493 5.945739 7.950081 -2.984953 -1.004779 1.980175 -8.109105 -9.727662 -8.109105 1.618557 R8_MODP_TEST Normal end of execution. R8_MOP_TEST R8_MOP evaluates (-1.0)^I4 as an R8. I4 R8_MOP(I4) -57 -1.0 92 1.0 66 1.0 12 1.0 -17 -1.0 -87 -1.0 -49 -1.0 -78 1.0 -92 1.0 27 -1.0 R8_MOP_TEST Normal end of execution. R8_NINT_TEST R8_NINT produces the nearest integer. X R8_NINT(X) -5.631634 -6 9.126352 10 6.590185 7 1.233909 2 -1.693858 -2 -8.677625 -9 -4.848444 -5 -7.800864 -8 -9.123420 -10 2.679314 3 R8_NINT_TEST Normal end of execution. R8_NORMAL_01_TEST R8_NORMAL_01 generates normally distributed random values. Using initial random number seed = 123456789 1.679040 -0.566060 1.212934 1.269381 -1.666087 -2.242464 0.039675 0.673068 -0.275127 2.164005 0.297785 2.044536 1.398819 -1.242985 -0.067084 -0.794396 -0.523768 -0.350567 0.131700 0.537380 R8_NORMAL_01_TEST Normal end of execution. R8_NORMAL_AB_TEST R8_NORMAL_AB generates normally distributed values with given mean and standard deviation. Using initial random number seed = 123456789 MEAN = 100 STD = 10 116.790403 94.339402 112.129342 112.693806 83.339133 77.575360 100.396749 106.730682 97.248726 121.640048 102.977852 120.445356 113.988185 87.570149 99.329163 92.056040 94.762315 96.494328 101.316998 105.373799 R8_NORMAL_AB_TEST Normal end of execution. R8_PI_TEST R8_PI returns the value of PI. R8_PI = 3.1415926535897931 4 * Atan(1) = 3.1415926535897931 PI = 3.1415926535897931 R8_PI_TEST Normal end of execution. R8_POWER_TEST R8_POWER computes R^P. R P R8_POWER 2.000000 -5 0.031250 2.000000 -4 0.062500 2.000000 -3 0.125000 2.000000 -2 0.250000 2.000000 -1 0.500000 2.000000 0 1.000000 2.000000 1 2.000000 2.000000 2 4.000000 2.000000 3 8.000000 2.000000 4 16.000000 2.000000 5 32.000000 R8_POWER_TEST Normal end of execution. R8_POWER_FAST_TEST R8_POWER_FAST computes R^P, economizing on multiplications. R P R^P Mults 2.000000 -10 0.000977 7 2.000000 -9 0.001953 7 2.000000 -8 0.003906 6 2.000000 -7 0.007812 7 2.000000 -6 0.015625 6 2.000000 -5 0.031250 6 2.000000 -4 0.062500 5 2.000000 -3 0.125000 5 2.000000 -2 0.250000 4 2.000000 -1 0.500000 1 2.000000 0 1.000000 0 2.000000 1 2.000000 0 2.000000 2 4.000000 3 2.000000 3 8.000000 4 2.000000 4 16.000000 4 2.000000 5 32.000000 5 2.000000 6 64.000000 5 2.000000 7 128.000000 6 2.000000 8 256.000000 5 2.000000 9 512.000000 6 2.000000 10 1024.000000 6 2.000000 11 2048.000000 7 2.000000 12 4096.000000 6 2.000000 13 8192.000000 7 2.000000 14 16384.000000 7 2.000000 15 32768.000000 8 2.000000 16 65536.000000 6 2.000000 17 131072.000000 7 2.000000 18 262144.000000 7 2.000000 19 524288.000000 8 2.000000 20 1048576.000000 7 2.000000 21 2097152.000000 8 2.000000 22 4194304.000000 8 2.000000 23 8388608.000000 9 2.000000 24 16777216.000000 7 2.000000 25 33554432.000000 8 2.000000 26 67108864.000000 8 2.000000 27 134217728.000000 9 2.000000 28 268435456.000000 8 2.000000 29 536870912.000000 9 2.000000 30 1073741824.000000 9 2.000000 31 2147483648.000000 10 2.000000 32 4294967296.000000 7 2.000000 33 8589934592.000000 8 2.000000 34 17179869184.000000 8 2.000000 35 34359738368.000000 9 2.000000 36 68719476736.000000 8 2.000000 37 137438953472.000000 9 2.000000 38 274877906944.000000 9 2.000000 39 549755813888.000000 10 2.000000 40 1099511627776.000000 8 R8_POWER_FAST_TEST Normal end of execution. R8_RISE_TEST R8_RISE evaluates the rising factorial Rise(X,N). X N Exact Computed 5 4 1680 1680 5.25 4 1962.59765625 1962.59765625 5.5 4 2279.0625 2279.0625 5.75 4 2631.97265625 2631.97265625 6 4 3024 3024 7.5 0 1 1 7.5 1 7.5 7.5 7.5 2 63.75 63.75 7.5 3 605.625 605.625 7.5 4 6359.0625 6359.0625 7.5 5 73129.21875 73129.21875 7.5 6 914115.234375 914115.234375 7.5 7 12340555.6640625 12340555.6640625 7.5 8 178938057.1289063 178938057.1289062 7.5 9 2773539885.498047 2773539885.498047 R8_RISE_TEST Normal end of execution. R8_RISE_VALUES_TEST: R8_RISE_VALUES returns values of the rising factorial. X N R8_RISE(X,N) 5.0000 4 1680 5.2500 4 1962.59765625 5.5000 4 2279.0625 5.7500 4 2631.97265625 6.0000 4 3024 7.5000 0 1 7.5000 1 7.5 7.5000 2 63.75 7.5000 3 605.625 7.5000 4 6359.0625 7.5000 5 73129.21875 7.5000 6 914115.234375 7.5000 7 12340555.6640625 7.5000 8 178938057.1289063 7.5000 9 2773539885.498047 R8_RISE_VALUES_TEST: Normal end of execution. R8_ROUND2_TEST R8_ROUND2 rounds a number to a specified number of base 2 digits. Test effect on PI: X = 3.141593 NPLACE XROUND 0 0.000000 1 2.000000 2 3.000000 3 3.000000 4 3.000000 5 3.125000 6 3.125000 7 3.125000 8 3.140625 9 3.140625 10 3.140625 11 3.140625 12 3.140625 13 3.141113 14 3.141357 15 3.141479 16 3.141541 17 3.141571 18 3.141586 19 3.141586 20 3.141590 R8_ROUND2_TEST Normal end of execution. R8_ROUNDB_TEST R8_ROUNDB rounds a number to a specified number of base BASE digits. Here, we will use BASE = 3 Test effect on PI: X = 3.141593 NPLACE XROUND 0 0.000000 1 3.000000 2 3.000000 3 3.000000 4 3.111111 5 3.111111 6 3.135802 7 3.139918 8 3.141289 9 3.141289 10 3.141442 11 3.141543 12 3.141577 13 3.141589 14 3.141592 15 3.141592 16 3.141593 17 3.141593 18 3.141593 19 3.141593 20 3.141593 Try with a negative base: Input quantity is X = 121.000000 to be rounded in base -3 Output value to 1 places is 81.000000 Output value to 2 places is 108.000000 Output value to 3 places is 117.000000 Output value to 4 places is 120.000000 Output value to 5 places is 121.000000 R8_ROUNDB_TEST Normal end of execution. R8_ROUNDX_TEST R8_ROUNDX rounds a number to a specified number of decimal digits. Test effect on PI: X = 3.141593 NPLACE XROUND 0 0.000000 1 3.000000 2 3.100000 3 3.140000 4 3.141000 5 3.141500 6 3.141590 7 3.141592 8 3.141593 9 3.141593 10 3.141593 Test effect on random values: NPLACE X XROUND 0 0.218418 0.000000 2 0.218418 0.210000 4 0.218418 0.218400 6 0.218418 0.218418 8 0.218418 0.218418 10 0.218418 0.218418 0 0.956318 0.000000 2 0.956318 0.950000 4 0.956318 0.956300 6 0.956318 0.956317 8 0.956318 0.956318 10 0.956318 0.956318 0 0.829509 0.000000 2 0.829509 0.820000 4 0.829509 0.829500 6 0.829509 0.829509 8 0.829509 0.829509 10 0.829509 0.829509 0 0.561695 0.000000 2 0.561695 0.560000 4 0.561695 0.561600 6 0.561695 0.561695 8 0.561695 0.561695 10 0.561695 0.561695 0 0.415307 0.000000 2 0.415307 0.410000 4 0.415307 0.415300 6 0.415307 0.415307 8 0.415307 0.415307 10 0.415307 0.415307 R8_ROUNDX_TEST Normal end of execution. R8_SECD_TEST R8_SECD computes the secant of an angle given in degrees. ANGLE R8_SECD(ANGLE) 0.00 1 15.00 1.03528 30.00 1.1547 45.00 1.41421 60.00 2 75.00 3.8637 90.00 Undefined 105.00 -3.8637 120.00 -2 135.00 -1.41421 150.00 -1.1547 165.00 -1.03528 180.00 -1 195.00 -1.03528 210.00 -1.1547 225.00 -1.41421 240.00 -2 255.00 -3.8637 270.00 Undefined 285.00 3.8637 300.00 2 315.00 1.41421 330.00 1.1547 345.00 1.03528 360.00 1 R8_SECD_TEST Normal end of execution. R8_SIGN_TEST R8_SIGN returns the sign of an R8. R8 R8_SIGN(R8) -1.2500 -1 -0.2500 -1 0.0000 1 0.5000 1 9.0000 1 R8_SIGN_TEST Normal end of execution. R8_SIND_TEST R8_SIND computes the sine of an angle given in degrees. ANGLE R8_SIND(ANGLE) 0.00 0 15.00 0.258819 30.00 0.5 45.00 0.707107 60.00 0.866025 75.00 0.965926 90.00 1 105.00 0.965926 120.00 0.866025 135.00 0.707107 150.00 0.5 165.00 0.258819 180.00 1.22465e-16 195.00 -0.258819 210.00 -0.5 225.00 -0.707107 240.00 -0.866025 255.00 -0.965926 270.00 -1 285.00 -0.965926 300.00 -0.866025 315.00 -0.707107 330.00 -0.5 345.00 -0.258819 360.00 -2.44929e-16 R8_SIND_TEST Normal end of execution. R8_SWAP_TEST R8_SWAP swaps two reals. Before swapping: X = 1.000000 Y = 3.141590 After swapping: X = 3.141590 Y = 1.000000 R8_SWAP_TEST Normal end of execution. R8_SWAP3_TEST R8_SWAP3 swaps three reals. Before 1 3.14159 1952 Swap 0: 3.14159 1952 1 Swap 1: 1952 1 3.14159 Swap 2: 1 3.14159 1952 R8_SWAP3_TEST Normal end of execution. R8_TAND_TEST R8_TAND computes the tangent of an angle given in degrees. ANGLE R8_TAND(ANGLE) 0.00 0 15.00 0.267949 30.00 0.57735 45.00 1 60.00 1.73205 75.00 3.73205 90.00 Undefined 105.00 -3.73205 120.00 -1.73205 135.00 -1 150.00 -0.57735 165.00 -0.267949 180.00 -1.22465e-16 195.00 0.267949 210.00 0.57735 225.00 1 240.00 1.73205 255.00 3.73205 270.00 Undefined 285.00 -3.73205 300.00 -1.73205 315.00 -1 330.00 -0.57735 345.00 -0.267949 360.00 -2.44929e-16 R8_TAND_TEST Normal end of execution. R8_TO_I4_TEST R8_TO_I4 finds an integer IX in [IXMIN,IXMAX] corresponding to X in [XMIN,XMAX]. XMIN = 2.500000, X = 3.500000, XMAX = 5.500000 IXMIN = 10, IX = 20, IXMAX = 40 R8_TO_I4_TEST Normal end of execution. R8_TO_R8_DISCRETE R8_TO_R8_DISCRETE maps numbers to a discrete set of equally spaced numbers in an interval. Number of discrete values = 19 Real interval: [1.000000, 10.000000] R RD 1.839438 1.947368 11.432128 10.000000 9.783620 10.000000 6.302041 6.210526 4.398992 4.315789 -0.140456 1.000000 2.348511 2.421053 0.429438 1.000000 -0.430223 1.000000 7.241554 7.157895 -0.197546 1.000000 4.844006 4.789474 4.216982 4.315789 8.810755 8.578947 9.364730 9.526316 R8_TO_R8_DISCRETE Normal end of execution. R8_UNIFORM_01_TEST R8_UNIFORM_01 produces a sequence of random values. Using random seed 123456789 SEED R8_UNIFORM_01(SEED) 469049721 0.218418 2053676357 0.956318 1781357515 0.829509 1206231778 0.561695 891865166 0.415307 141988902 0.066119 553144097 0.257578 236130416 0.109957 94122056 0.043829 1361431000 0.633966 Verify that the sequence can be restarted. Set the seed back to its original value, and see that we generate the same sequence. SEED R8_UNIFORM_01(SEED) 469049721 0.218418 2053676357 0.956318 1781357515 0.829509 1206231778 0.561695 891865166 0.415307 141988902 0.066119 553144097 0.257578 236130416 0.109957 94122056 0.043829 1361431000 0.633966 R8_UNIFORM_01_TEST Normal end of execution. R8_UNIFORM_AB_TEST R8_UNIFORM_AB returns random values in a given range: [ A, B ] For this problem: A = 10.000000 B = 20.000000 12.184183 19.563176 18.295092 15.616954 14.153071 10.661187 12.575778 11.099568 10.438290 16.339657 R8_UNIFORM_AB_TEST Normal end of execution R8_WALSH_1D_TEST R8_WALSH_1D evaluates 1D Walsh functions: X W(+2) W(+1) W(0) W(-1) W(-2) W(-3) 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.250000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.500000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.750000 0.000000 0.000000 0.000000 1.000000 1.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.250000 0.000000 0.000000 1.000000 0.000000 1.000000 0.000000 1.500000 0.000000 0.000000 1.000000 1.000000 0.000000 0.000000 1.750000 0.000000 0.000000 1.000000 1.000000 1.000000 0.000000 2.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 2.250000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 2.500000 0.000000 1.000000 0.000000 1.000000 0.000000 0.000000 2.750000 0.000000 1.000000 0.000000 1.000000 1.000000 0.000000 3.000000 0.000000 1.000000 1.000000 0.000000 0.000000 0.000000 3.250000 0.000000 1.000000 1.000000 0.000000 1.000000 0.000000 3.500000 0.000000 1.000000 1.000000 1.000000 0.000000 0.000000 3.750000 0.000000 1.000000 1.000000 1.000000 1.000000 0.000000 4.000000 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 4.250000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 4.500000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 4.750000 1.000000 0.000000 0.000000 1.000000 1.000000 0.000000 5.000000 1.000000 0.000000 1.000000 0.000000 0.000000 0.000000 5.250000 1.000000 0.000000 1.000000 0.000000 1.000000 0.000000 5.500000 1.000000 0.000000 1.000000 1.000000 0.000000 0.000000 5.750000 1.000000 0.000000 1.000000 1.000000 1.000000 0.000000 6.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 6.250000 1.000000 1.000000 0.000000 0.000000 1.000000 0.000000 6.500000 1.000000 1.000000 0.000000 1.000000 0.000000 0.000000 6.750000 1.000000 1.000000 0.000000 1.000000 1.000000 0.000000 7.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000 7.250000 1.000000 1.000000 1.000000 0.000000 1.000000 0.000000 7.500000 1.000000 1.000000 1.000000 1.000000 0.000000 0.000000 7.750000 1.000000 1.000000 1.000000 1.000000 1.000000 0.000000 8.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 R8_WALSH_1D_TEST Normal end of execution R8_WRAP_TEST R8_WRAP "wraps" an R8 to lie within an interval: Wrapping interval is 3.000000, 6.500000 R R8_WRAP ( R ) 1.05786 4.55786 11.3884 4.38845 9.61313 6.11313 5.86374 5.86374 3.8143 3.8143 -1.07434 5.92566 1.60609 5.10609 -0.460605 3.0394 -1.38639 5.61361 6.87552 3.37552 -1.13582 5.86418 4.29355 4.29355 3.61829 3.61829 8.56543 5.06543 9.16202 5.66202 -1.97426 5.02574 10.5651 3.56506 2.91053 6.41053 -0.676373 6.32363 -1.80936 5.19064 R8_WRAP_TEST Normal end of execution. R82COL_PRINT_PART_TEST R82COL_PRINT_PART prints an R82COL. Output with MAX_PRINT = 2 0 11 12 1 21 22 ...more entries... Output with MAX_PRINT = 5 0 11 12 1 21 22 2 31 32 .... .............. .............. 9 101 102 Output with MAX_PRINT = 25 0 11 12 1 21 22 2 31 32 3 41 42 4 51 52 5 61 62 6 71 72 7 81 82 8 91 92 9 101 102 R82COL_PRINT_PART_TEST: Normal end of execution. R82ROW_PRINT_PART_TEST R82ROW_PRINT_PART prints part of an R82ROW, a real array of 2 rows. Output with MAX_PRINT = 2 0 11 21 1 12 22 ...more entries... Output with MAX_PRINT = 5 0 11 21 1 12 22 2 13 23 .... .............. .............. 9 20 30 Output with MAX_PRINT = 25 0 11 21 1 12 22 2 13 23 3 14 24 4 15 25 5 16 26 6 17 27 7 18 28 8 19 29 9 20 30 R82ROW_PRINT_PART_TEST: Normal end of execution. R83COL_PRINT_PART_TEST R83COL_PRINT_PART prints part of an R83COL. Output with MAX_PRINT = 2 0 11 12 13 1 21 22 23 ...more entries... Output with MAX_PRINT = 5 0 11 12 13 1 21 22 23 2 31 32 33 .... .............. .............. .............. 9 101 102 103 Output with MAX_PRINT = 25 0 11 12 13 1 21 22 23 2 31 32 33 3 41 42 43 4 51 52 53 5 61 62 63 6 71 72 73 7 81 82 83 8 91 92 93 9 101 102 103 R82COL_PRINT_PART_TEST: Normal end of execution. R83ROW_PRINT_PART_TEST R83ROW_PRINT_PART prints part of an R83ROW, a real array of 3 rows. Output with MAX_PRINT = 2 0 11 21 31 1 12 22 32 ...more entries... Output with MAX_PRINT = 5 0 11 21 31 1 12 22 32 2 13 23 33 .... .............. .............. 9 20 30 40 Output with MAX_PRINT = 25 0 11 21 31 1 12 22 32 2 13 23 33 3 14 24 34 4 15 25 35 5 16 26 36 6 17 27 37 7 18 28 38 8 19 29 39 9 20 30 40 R83ROW_PRINT_PART_TEST: Normal end of execution. R8COL_SWAP_TEST For an R8COL, an array of column vectors; R8COL_SWAP swaps two columns; The array: Col: 0 1 2 3 Row 0 : 11 12 13 14 1 : 21 22 23 24 2 : 31 32 33 34 Swap columns 0 and 2 The updated matrix: Col: 0 1 2 3 Row 0 : 13 12 11 14 1 : 23 22 21 24 2 : 33 32 31 34 R8COL_SWAP_TEST Normal end of execution. R8MAT_HOUSE_AXH_TEST R8MAT_HOUSE_AXH multiplies a matrix A times a compact Householder matrix. Matrix A: Col: 0 1 2 3 4 Row 0 : -2.81582 -4.33881 -4.38273 -4.98162 3.59097 1 : 4.56318 -2.42422 -0.50461 3.97504 3.40847 2 : 3.29509 -3.90043 -0.986937 -1.49248 -3.76896 3 : 0.616954 -4.56171 2.54673 -4.05455 -4.92488 4 : -0.846929 1.33966 2.97287 -4.86383 -2.39697 Compact vector V so column 3 of H*A is packed: 0 0 1 0 2 -0.788819 3 0.399863 4 0.466771 Householder matrix H: Col: 0 1 2 3 4 Row 0 : 1 0 0 0 0 1 : 0 1 0 0 0 2 : 0 0 -0.244469 0.630839 0.736395 3 : 0 0 0.630839 0.680219 -0.373289 4 : 0 0 0.736395 -0.373289 0.56425 Indirect product A*H: Col: 0 1 2 3 4 Row 0 : -2.81582 -4.33881 0.573215 -7.49385 0.65837 1 : 4.56318 -2.42422 5.14095 1.11322 0.0678026 2 : 3.29509 -3.90043 -3.47568 -0.230898 -2.29629 3 : 0.616954 -4.56171 -6.80702 0.686997 0.610057 4 : -0.846929 1.33966 -5.56019 -0.538306 2.65233 Direct product A*H: Col: 0 1 2 3 4 Row 0 : -2.81582 -4.33881 0.573215 -7.49385 0.65837 1 : 4.56318 -2.42422 5.14095 1.11322 0.0678026 2 : 3.29509 -3.90043 -3.47568 -0.230898 -2.29629 3 : 0.616954 -4.56171 -6.80702 0.686997 0.610057 4 : -0.846929 1.33966 -5.56019 -0.538306 2.65233 H*A should pack column 3: Col: 0 1 2 3 4 Row 0 : -2.81582 -4.33881 -4.38273 -4.98162 3.59097 1 : 4.56318 -2.42422 -0.50461 3.97504 3.40847 2 : -1.04002 -0.937652 4.03706 -5.7746 -3.95052 3 : 2.81449 -6.06358 -4.44089e-16 -1.88388 -4.83284 4 : 1.71831 -0.41352 -4.44089e-16 -2.32995 -2.28953 R8MAT_HOUSE_AXH_TEST Normal end of execution. R8MAT_HOUSE_FORM_TEST R8MAT_HOUSE_FORM forms a Householder matrix from its compact form. Compact vector form V: 0 0 1 0 2 1 3 2 4 3 Householder matrix H: Col: 0 1 2 3 4 Row 0 : 1 0 0 0 0 1 : 0 1 0 0 0 2 : 0 0 0.857143 -0.285714 -0.428571 3 : 0 0 -0.285714 0.428571 -0.857143 4 : 0 0 -0.428571 -0.857143 -0.285714 R8MAT_HOUSE_FORM_TEST Normal end of execution. R8MAT_INDICATOR_TEST R8MAT_INDICATOR creates an "indicator" R8MAT. The indicator matrix: Col: 0 1 2 3 Row 0 : 11 12 13 14 1 : 21 22 23 24 2 : 31 32 33 34 3 : 41 42 43 44 4 : 51 52 53 54 R8MAT_INDICATOR_TEST Normal end of execution. R8MAT_MM_TEST R8MAT_MM computes a matrix-matrix product C = A * B; A: Col: 0 1 2 Row 0 : 1 0 0 1 : 1 1 0 2 : 1 2 1 3 : 1 3 3 B: Col: 0 1 2 3 Row 0 : 1 1 1 1 1 : 0 1 2 3 2 : 0 0 1 3 C = A*B: Col: 0 1 2 3 Row 0 : 1 1 1 1 1 : 1 2 3 4 2 : 1 3 6 10 3 : 1 4 10 19 R8MAT_MM_TEST Normal end of execution. R8MAT_MTM_TEST R8MAT_MTM computes a matrix-matrix product C = A' * B; A: Col: 0 1 2 3 Row 0 : 1 0 0 0 1 : 1 1 0 0 2 : 1 2 1 0 B: Col: 0 1 2 3 Row 0 : 1 0 0 0 1 : 1 1 0 0 2 : 1 2 1 0 C = A'*B: Col: 0 1 2 3 Row 0 : 3 3 1 0 1 : 3 5 2 0 2 : 1 2 1 0 3 : 0 0 0 0 R8MAT_MTM_TEST Normal end of execution. R8MAT_MTV_TEST R8MAT_MTV computes a matrix-vector product b = A' * x; A: Col: 0 1 Row 0 : 1 1 1 : 2 1 2 : 3 1 3 : 4 1 X: 0 1 1 2 2 3 3 4 B = A'*X: 0 30 1 10 R8MAT_MTV_TEST Normal end of execution. R8MAT_MV_TEST R8MAT_MV computes a matrix-vector product b = A * x; A: Col: 0 1 Row 0 : 1 1 1 : 2 1 2 : 3 1 3 : 4 1 X: 0 1 1 2 B = A*X: 0 3 1 4 2 5 3 6 R8MAT_MV_TEST Normal end of execution. R8MAT_NINT_TEST R8MAT_NINT rounds an R8MAT. Matrix A: Col: 0 1 2 3 Row 0 : -2.81582 -4.33881 -4.38273 -4.98162 1 : 4.56318 -2.42422 -0.50461 3.97504 2 : 3.29509 -3.90043 -0.986937 -1.49248 3 : 0.616954 -4.56171 2.54673 -4.05455 4 : -0.846929 1.33966 2.97287 -4.86383 Rounded matrix A: Col: 0 1 2 3 Row 0 : -3 -4 -4 -5 1 : 5 -2 -1 4 2 : 3 -4 -1 -1 3 : 1 -5 3 -4 4 : -1 1 3 -5 R8MAT_NINT_TEST Normal end of execution. R8MAT_NONZEROS_TEST R8MAT_NONZEROS counts nonzeros in an R8MAT. Matrix A: Col: 0 1 2 3 Row 0 : 1 0 1 0 1 : 0 0 0 0 2 : 1 0 1 0 3 : 0 0 0 0 4 : 1 0 1 0 Expected nonzeros = 6 Computed nonzeros = 6 R8MAT_NONZEROS_TEST Normal end of execution. R8MAT_NORM_FRO_TEST R8MAT_NORM_FRO computes the Frobenius norm of an R8MAT; A: Col: 0 1 2 3 Row 0 : 1 2 3 4 1 : 5 6 7 8 2 : 9 10 11 12 3 : 13 14 15 16 4 : 17 18 19 20 Expected Frobenius norm = 53.5724 Computed Frobenius norm = 53.5724 R8MAT_NORM_FRO_TEST Normal end of execution. R8MAT_NORM_L1_TEST R8MAT_NORM_L1 computes the L1 norm of an R8MAT; A: Col: 0 1 2 3 Row 0 : -3 -4 -4 -5 1 : 5 -2 -1 4 2 : 3 -4 -1 -1 3 : 1 -5 3 -4 4 : -1 1 3 -5 Computed L1 norm = 19 R8MAT_NORM_L1_TEST Normal end of execution. R8MAT_PRINT_TEST R8MAT_PRINT prints an R8MAT. Here is an R8MAT: Col: 0 1 2 3 4 Row 0 : 11 12 13 14 15 1 : 21 22 23 24 25 2 : 31 32 33 34 35 3 : 41 42 43 44 45 Col: 5 Row 0 : 16 1 : 26 2 : 36 3 : 46 R8MAT_PRINT_TEST: Normal end of execution. R8MAT_PRINT_SOME_TEST R8MAT_PRINT_SOME prints some of an R8MAT. Here is an R8MAT: Col: 3 4 5 Row 0 : 14 15 16 1 : 24 25 26 2 : 34 35 36 R8MAT_PRINT_SOME_TEST: Normal end of execution. R8MAT_SUB_TEST R8MAT_SUB computes C = A - B; A: Col: 0 1 2 3 Row 0 : 11 12 13 14 1 : 21 22 23 24 2 : 31 32 33 34 3 : 41 42 43 44 B: Col: 0 1 2 3 Row 0 : 11 21 31 41 1 : 12 22 32 42 2 : 13 23 33 43 3 : 14 24 34 44 C = A - B: Col: 0 1 2 3 Row 0 : 0 -9 -18 -27 1 : 9 0 -9 -18 2 : 18 9 0 -9 3 : 27 18 9 0 R8MAT_SUB_TEST Normal end of execution. R8MAT_TRANSPOSE_TEST R8MAT_TRANSPOSE transposes an R8MAT. Matrix A: Col: 0 1 2 3 Row 0 : 11 12 13 14 1 : 21 22 23 24 2 : 31 32 33 34 3 : 41 42 43 44 4 : 51 52 53 54 Transposed matrix At: Col: 0 1 2 3 4 Row 0 : 11 21 31 41 51 1 : 12 22 32 42 52 2 : 13 23 33 43 53 3 : 14 24 34 44 54 R8MAT_TRANSPOSE_TEST Normal end of execution. R8MAT_TRANSPOSE_PRINT_TEST R8MAT_TRANSPOSE_PRINT prints an R8MAT. Here is an R8MAT, transposed: Row: 0 1 2 3 Col 0 : 11 21 31 41 1 : 12 22 32 42 2 : 13 23 33 43 R8MAT_TRANSPOSE_PRINT_TEST: Normal end of execution. R8MAT_TRANSPOSE_PRINT_SOME_TEST R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed. R8MAT, rows 0:2, cols 3:5: Row: 0 1 2 Col 3 : 14 24 34 4 : 15 25 35 5 : 16 26 36 R8MAT_TRANSPOSE_PRINT_SOME_TEST: Normal end of execution. R8MAT_UNIFORM_01_TEST R8MAT_UNIFORM_01 computes a random R8MAT. 0 <= X <= 1 Initial seed is 123456789 Random R8MAT: Col: 0 1 2 3 Row 0 : 0.218418 0.0661187 0.0617272 0.00183837 1 : 0.956318 0.257578 0.449539 0.897504 2 : 0.829509 0.109957 0.401306 0.350752 3 : 0.561695 0.043829 0.754673 0.0945448 4 : 0.415307 0.633966 0.797287 0.0136169 R8MAT_UNIFORM_01_TEST: Normal end of execution. R8MAT_UNIFORM_AB_TEST R8MAT_UNIFORM_AB computes a random R8MAT. -1 <= X <= 5 Initial seed is 123456789 Random R8MAT: Col: 0 1 2 3 Row 0 : 0.31051 -0.603288 -0.629637 -0.98897 1 : 4.73791 0.545467 1.69723 4.38502 2 : 3.97706 -0.340259 1.40784 1.10451 3 : 2.37017 -0.737026 3.52804 -0.432731 4 : 1.49184 2.80379 3.78372 -0.918299 R8MAT_UNIFORM_AB_TEST: Normal end of execution. R8POLY_DEGREE_TEST R8POLY_DEGREE determines the degree of an R8POLY. The R8POLY: p(x) = 4 * x^3 + 3 * x^2 + 2 * x + 1 Dimensioned degree = 3, Actual degree = 3 The R8POLY: p(x) = 0 * x^3 + 3 * x^2 + 2 * x + 1 Dimensioned degree = 3, Actual degree = 2 The R8POLY: p(x) = 4 * x^3 + 2 * x + 1 Dimensioned degree = 3, Actual degree = 3 The R8POLY: p(x) = 0 * x^3 + 1 Dimensioned degree = 3, Actual degree = 0 The R8POLY: p(x) = 0 * x^3 Dimensioned degree = 3, Actual degree = 0 R8POLY_DEGREE_TEST: Normal end of execution. R8POLY_PRINT_TEST R8POLY_PRINT prints an R8POLY. The R8POLY: p(x) = 9 * x^5 + 0.78 * x^4 + 56 * x^2 - 3.4 * x + 12 R8POLY_PRINT_TEST: Normal end of execution. R8POLY_VALUE_HORNER_TEST R8POLY_VALUE_HORNER evaluates a polynomial at a point using Horners method. The polynomial coefficients: p(x) = 1 * x^4 - 10 * x^3 + 35 * x^2 - 50 * x + 24 I X P(X) 0 0.0000 24 1 0.3333 10.8642 2 0.6667 3.45679 3 1.0000 0 4 1.3333 -0.987654 5 1.6667 -0.691358 6 2.0000 0 7 2.3333 0.493827 8 2.6667 0.493827 9 3.0000 0 10 3.3333 -0.691358 11 3.6667 -0.987654 12 4.0000 0 13 4.3333 3.45679 14 4.6667 10.8642 15 5.0000 24 R8POLY_VALUE_HORNER_TEST: Normal end of execution. R8VEC_AMAX_TEST R8VEC_AMAX computes the maximum absolute value entry in an R8VEC. Input vector: 0 -5.63163 1 9.12635 2 6.59018 3 1.23391 4 -1.69386 5 -8.67763 6 -4.84844 7 -7.80086 8 -9.12342 9 2.67931 Max Abs = 9.12635 R8VEC_AMAX_TEST: Normal end of execution. R8VEC_AMIN_TEST R8VEC_AMIN computes the minimum absolute entry in an R8VEC. Input vector: 0 -5.63163 1 9.12635 2 6.59018 3 1.23391 4 -1.69386 5 -8.67763 6 -4.84844 7 -7.80086 8 -9.12342 9 2.67931 Min Abs = 1.23391 R8VEC_AMIN_TEST: Normal end of execution. R8VEC_ASUM_TEST R8VEC_ASUM sums the absolute values of the entries in an R8VEC. Input vector: 0 -5.63163 1 9.12635 2 6.59018 3 1.23391 4 -1.69386 5 -8.67763 6 -4.84844 7 -7.80086 8 -9.12342 9 2.67931 Sum of absolute values of entries = 57.4056 R8VEC_ASUM_TEST: Normal end of execution. R8VEC_CONCATENATE_TEST R8VEC_CONCATENATE concatenates two R8VECs Array 1: 0 91.1 1 31.2 2 71.3 3 51.4 4 31.5 Array 2: 0 42.6 1 22.7 2 12.8 Array 3 = Array 1 + Array 2: 0 91.1 1 31.2 2 71.3 3 51.4 4 31.5 5 42.6 6 22.7 7 12.8 R8VEC_CONCATENATE_TEST Normal end of execution. R8VEC_COPY_TEST R8VEC_COPY copies an R8VEC. Array 1: 0 91.1 1 31.2 2 71.3 3 51.4 4 31.5 Array 2: 0 91.1 1 31.2 2 71.3 3 51.4 4 31.5 R8VEC_COPY_TEST Normal end of execution. R8VEC_DIRECT_PRODUCT_TEST R8VEC_DIRECT_PRODUCT forms the entries of a direct product of a given number of R8VEC factors. Matrix (transposed) Row: 0 1 2 Col 0 : 1 50 800 1 : 2 50 800 2 : 3 50 800 3 : 4 50 800 4 : 1 60 800 5 : 2 60 800 6 : 3 60 800 7 : 4 60 800 8 : 1 70 800 9 : 2 70 800 10 : 3 70 800 11 : 4 70 800 12 : 1 50 900 13 : 2 50 900 14 : 3 50 900 15 : 4 50 900 16 : 1 60 900 17 : 2 60 900 18 : 3 60 900 19 : 4 60 900 20 : 1 70 900 21 : 2 70 900 22 : 3 70 900 23 : 4 70 900 R8VEC_DIRECT_PRODUCT_TEST: Normal end of execution. R8VEC_HOUSE_COLUMN_TEST R8VEC_HOUSE_COLUMN returns the compact form of a Householder matrix that "packs" a column of a matrix. Matrix A: Col: 0 1 2 3 Row 0 : 1.09209 2.07654 0.219145 2.00653 1 : 4.78159 0.330594 3.16983 3.77337 2 : 4.14755 1.28789 0.308636 3.98643 3 : 2.80848 0.549784 2.24769 0.00919186 Working on column K = 0 Householder matrix H: Col: 0 1 2 3 Row 0 : -0.155781 -0.682069 -0.591626 -0.400615 1 : -0.682069 0.597486 -0.34914 -0.236418 2 : -0.591626 -0.34914 0.697156 -0.205068 3 : -0.400615 -0.236418 -0.205068 0.86114 Product H*A: Col: 0 1 2 3 Row 0 : -7.01042 -1.53117 -3.27924 -5.24844 1 : -8.88178e-16 -1.79845 1.1053 -0.508058 2 : -1.77636e-15 -0.558841 -1.48213 0.272729 3 : -8.88178e-16 -0.700714 1.03509 -2.50551 Working on column K = 1 Householder matrix H: Col: 0 1 2 3 Row 0 : 1 0 0 0 1 : 0 -0.895014 -0.278112 -0.348717 2 : 0 -0.278112 0.959184 -0.0511776 3 : 0 -0.348717 -0.0511776 0.93583 Product H*A: Col: 0 1 2 3 Row 0 : -7.01042 -1.53117 -3.27924 -5.24844 1 : 1.59868e-15 2.00941 -0.938018 1.25258 2 : -1.41139e-15 7.63278e-17 -1.78201 0.531121 3 : -4.30552e-16 0 0.659083 -2.18152 Working on column K = 2 Householder matrix H: Col: 0 1 2 3 Row 0 : 1 0 0 0 1 : 0 1 0 0 2 : 0 0 -0.937906 0.346889 3 : 0 0 0.346889 0.937906 Product H*A: Col: 0 1 2 3 Row 0 : -7.01042 -1.53117 -3.27924 -5.24844 1 : 1.59868e-15 2.00941 -0.938018 1.25258 2 : 1.17439e-15 -7.15884e-17 1.89999 -1.25489 3 : -8.9341e-16 2.64773e-17 1.11022e-16 -1.86183 R8VEC_HOUSE_COLUMN_TEST Normal end of execution. R8VEC_INDICATOR0_TEST R8VEC_INDICATOR0 returns an indicator matrix. The indicator0 vector: 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 R8VEC_INDICATOR0_TEST Normal end of execution. R8VEC_LINSPACE_TEST R8VEC_LINSPACE returns evenly spaced values between A and B. The linspace vector: 0 10 1 12.5 2 15 3 17.5 4 20 R8VEC_LINSPACE_TEST Normal end of execution. R8VEC_MAX_TEST R8VEC_MAX computes the maximum entry in an R8VEC. Input vector: 0 -5.63163 1 9.12635 2 6.59018 3 1.23391 4 -1.69386 5 -8.67763 6 -4.84844 7 -7.80086 8 -9.12342 9 2.67931 Max = 9.12635 R8VEC_MAX_TEST: Normal end of execution. R8VEC_MEAN_TEST R8VEC_MEAN computes the mean of an R8VEC. Input vector: 0 -2.81582 1 4.56318 2 3.29509 3 0.616954 4 -0.846929 5 -4.33881 6 -2.42422 7 -3.90043 8 -4.56171 9 1.33966 Value = -0.907304 R8VEC_MEAN_TEST: Normal end of execution. R8VEC_MIN_TEST R8VEC_MIN computes the minimum entry in an R8VEC. Input vector: 0 -5.63163 1 9.12635 2 6.59018 3 1.23391 4 -1.69386 5 -8.67763 6 -4.84844 7 -7.80086 8 -9.12342 9 2.67931 Min = -9.12342 R8VEC_MIN_TEST: Normal end of execution. R8VEC_NINT_TEST R8VEC_NINT rounds an R8VEC. Vector A: 0 -2.81582 1 4.56318 2 3.29509 3 0.616954 4 -0.846929 Rounded vector A: 0 -3 1 5 2 3 3 1 4 -1 R8VEC_NINT_TEST: Normal end of execution. R8VEC_NORM_L0_TEST R8VEC_NORM_L0 computes the L0 "norm" of an R8VEC. Input vector: 0 -1 1 2 2 1 3 0 4 -0 5 -2 6 -1 7 -2 8 -2 9 1 L0 norm = 8 R8VEC_NORM_L0_TEST: Normal end of execution. R8VEC_NORM_L2_TEST R8VEC_NORM_L2 computes the L2 norm of an R8VEC. Input vector: 0 -5.63163 1 9.12635 2 6.59018 3 1.23391 4 -1.69386 5 -8.67763 6 -4.84844 7 -7.80086 8 -9.12342 9 2.67931 L2 norm = 20.3201 R8VEC_NORM_L2_TEST: Normal end of execution. R8VEC_NORM_LI_TEST R8VEC_NORM_LI computes the Loo norm of an R8VEC. Input vector: 0 -2.81582 1 4.56318 2 3.29509 3 0.616954 4 -0.846929 5 -4.33881 6 -2.42422 7 -3.90043 8 -4.56171 9 1.33966 Loo norm = 4.56318 R8VEC_NORM_LI_TEST: Normal end of execution. R8VEC_PERMUTE_TEST R8VEC_PERMUTE permutes an R8VEC. Original array X[]: 0 1.1 1 2.2 2 3.3 3 4.4 4 5.5 Permutation vector P[]: 0 1 1 3 2 4 3 0 4 2 Permuted array X[P[*]]: 0 2.2 1 4.4 2 5.5 3 1.1 4 3.3 R8VEC_PERMUTE_TEST: Normal end of execution. R8VEC_PERMUTE_UNIFORM_TEST R8VEC_PERMUTE_UNIFORM randomly reorders an R8VEC. A, before rearrangement: 0 101 1 102 2 103 3 104 4 105 5 106 6 107 7 108 8 109 9 110 10 111 11 112 A, after rearrangement: 0 103 1 112 2 111 3 109 4 108 5 106 6 105 7 107 8 104 9 101 10 110 11 102 R8VEC_PERMUTE_UNIFORM_TEST: Normal end of execution. R8VEC_PRINT_TEST R8VEC_PRINT prints an R8VEC. Here is an R8VEC: 0 123.456 1 5e-06 2 -1e+06 3 3.14159 R8VEC_PRINT_TEST: Normal end of execution. R8VEC_PRODUCT_TEST R8VEC_PRODUCT computes the product of the entries in an R8VEC. Input vector: 0 -5.63163 1 9.12635 2 6.59018 3 1.23391 4 -1.69386 5 -8.67763 6 -4.84844 7 -7.80086 8 -9.12342 9 2.67931 Product of entries = 5.67959e+06 R8VEC_PRODUCT_TEST: Normal end of execution. R8VEC_SUM_TEST R8VEC_SUM sums the entries in an R8VEC. Input vector: 0 -5.63163 1 9.12635 2 6.59018 3 1.23391 4 -1.69386 5 -8.67763 6 -4.84844 7 -7.80086 8 -9.12342 9 2.67931 Sum of entries = -18.1461 R8VEC_SUM_TEST: Normal end of execution. R8VEC_UNIFORM_01_TEST R8VEC_UNIFORM_01 computes a random R8VEC. Initial seed is 123456789 Random R8VEC: 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 R8VEC_UNIFORM_01_TEST: Normal end of execution. R8VEC_UNIFORM_AB_TEST R8VEC_UNIFORM_AB computes a random R8VEC. -1 <= X <= 5 Initial seed is 123456789 Random R8VEC: 0 0.31051 1 4.73791 2 3.97706 3 2.37017 4 1.49184 5 -0.603288 6 0.545467 7 -0.340259 8 -0.737026 9 2.80379 R8VEC_UNIFORM_AB_TEST: Normal end of execution. R8VEC_VARIANCE_TEST R8VEC_VARIANCE computes the variance of an R8VEC. Input vector: 0 -2.81582 1 4.56318 2 3.29509 3 0.616954 4 -0.846929 5 -4.33881 6 -2.42422 7 -3.90043 8 -4.56171 9 1.33966 Value = 10.5549 R8VEC_VARIANCE_TEST: Normal end of execution. ROOTS_TO_R8POLY_TEST ROOTS_TO_R8POLY is given N real roots, and constructs the coefficient vector of the corresponding polynomial. N real roots: 0 1 1 -4 2 3 3 0 4 3 The polynomial: p(x) = 1 * x^5 - 3 * x^4 - 13 * x^3 + 51 * x^2 - 36 * x ROOTS_TO_R8POLY_TEST: Normal end of execution. TIMESTAMP_TEST: Python version: TIMESTAMP prints a timestamp of the current date and time. Sun May 24 13:41:19 2015 TIMESTAMP_TEST: Normal end of execution. R8LIB_TEST: Normal end of execution. Sun May 24 13:41:19 2015