Thu Sep 13 12:59:31 2018 POLYGON_MONTE_CARLO_TESTS Python version: 3.6.5 Test the POLYGON_MONTE_CARLO library. GAMMA_LOG_VALUES: Python version: 3.6.5 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. I4VEC_PRINT_TEST Python version: 3.6.5 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 Python version: 3.6.5 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. I4VEC_UNIFORM_AB_TEST Python version: 3.6.5 I4VEC_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 The random vector: 0 -35 1 187 2 149 3 69 4 25 5 -81 6 -23 7 -67 8 -87 9 90 10 -82 11 35 12 20 13 127 14 139 15 -100 16 170 17 5 18 -72 19 -96 I4VEC_UNIFORM_AB_TEST: Normal end of execution. MONOMIAL_VALUE_TEST Python version: 3.6.5 Use monomial_value() to evaluate some monomials in dimensions 1 through 3. Spatial dimension M = 1 Exponents: -1 V(X) X(0) 0.111111 9.0000 0.125 8.0000 0.2 5.0000 0.333333 3.0000 -1 -1.0000 Spatial dimension M = 2 Exponents: -1 -2 V(X) X(0) X(1) -0.0204082 -1.0000 7.0000 0.00260417 6.0000 8.0000 -0.25 -1.0000 -2.0000 0.00411523 3.0000 9.0000 0.0833333 3.0000 2.0000 Spatial dimension M = 3 Exponents: -3 -3 5 V(X) X(0) X(1) X(2) -6.10352 8.0000 -1.0000 5.0000 -4096 -1.0000 2.0000 8.0000 -0.0593262 -2.0000 8.0000 3.0000 59049 1.0000 1.0000 9.0000 0.0198458 9.0000 6.0000 5.0000 MONOMIAL_VALUE_TEST Normal end of execution. POLYGON_AREA_TEST Python version: 3.6.5 POLYGON_AREA computes the area of a polygon. Number of polygonal vertices = 4 The polygon vertices: Col: 0 1 Row 0 : 1 0 1 : 2 1 2 : 1 2 3 : 0 1 Exact area is 2 The computed area is 2 Number of polygonal vertices = 8 The polygon vertices: Col: 0 1 Row 0 : 0 0 1 : 3 0 2 : 3 3 3 : 2 3 4 : 2 1 5 : 1 1 6 : 1 2 7 : 0 2 Exact area is 6 The computed area is 6 POLYGON_AREA_TEST Normal end of execution. POLYGON_MONOMIAL_INTEGRAL_TEST Python version: 3.6.5 POLYGON_MONOMIAL_INTEGRAL evaluates the integral of a monomial x^p y^q over the interior of a polygon in 2D. Polygon vertices: Col: 0 1 Row 0 : 0 0 1 : 1 0 2 : 0 1 P Q Integral 0 0 0.5 0 1 0.166667 1 0 0.166667 0 2 0.0833333 1 1 0.0416667 2 0 0.0833333 0 3 0.05 1 2 0.0166667 2 1 0.0166667 3 0 0.05 0 4 0.0333333 1 3 0.00833333 2 2 0.00555556 3 1 0.00833333 4 0 0.0333333 POLYGON_MONOMIAL_INTEGRAL_TEST Normal end of execution. POLYGON_MONTE_CARLO_TEST Python version: 3.6.5 Use POLYGON_SAMPLE to estimate integrals over the interior of a polygon in 2D. N 1 X^2 Y^2 X^4 X^2Y^2 Y^4 X^6 1 4 1.30715 3.33161 0.427161 1.08873 2.77491 0.139591 2 4 1.0163 2.72309 0.461405 0.626743 1.87468 0.220482 4 4 1.58829 1.84793 0.963473 0.696657 1.36232 0.641431 8 4 1.73842 1.94693 1.20633 0.810609 1.24779 0.89358 16 4 1.33472 1.34091 0.714847 0.347929 0.790984 0.448165 32 4 1.07869 1.04884 0.656815 0.254187 0.554886 0.467036 64 4 1.4561 1.25486 0.946553 0.445319 0.770321 0.711559 128 4 1.2674 1.29739 0.751243 0.400381 0.714859 0.542932 256 4 1.3479 1.37355 0.812441 0.491397 0.844136 0.581991 512 4 1.33472 1.42057 0.795932 0.456832 0.881052 0.568154 1024 4 1.31462 1.31812 0.789657 0.446787 0.784188 0.564373 2048 4 1.31489 1.33885 0.779246 0.445582 0.811708 0.55045 4096 4 1.27431 1.30986 0.748162 0.420129 0.780171 0.52835 8192 4 1.32611 1.32112 0.792137 0.437433 0.789208 0.564479 16384 4 1.33069 1.34088 0.798738 0.444047 0.805857 0.569992 32768 4 1.32929 1.32452 0.797564 0.440865 0.794285 0.568834 65536 4 1.33733 1.33802 0.805023 0.446991 0.803426 0.576243 Exact 4 1.33333 1.33333 0.8 0.444444 0.8 0.571429 POLYGON_MONTE_CARLO_TEST Normal end of execution. POLYGON_SAMPLE_TEST Python version: 3.6.5 POLYGON_SAMPLE samples a polygon. Sample points: Col: 0 1 Row 0 : 1.57165 0.0436824 1 : 1.48143 0.584693 2 : 1.69243 0.109957 3 : 0.511266 1.44954 4 : 1.44804 0.754673 5 : 0.496513 0.102496 6 : 0.254573 0.0136169 7 : 1.86187 0.130616 8 : 0.0522955 0.0875163 9 : 0.180039 0.177113 10 : 0.577122 1.13878 11 : 1.49011 0.911977 12 : 0.316961 0.238508 13 : 0.117215 0.574366 14 : 0.574459 1.21293 15 : 0.417036 1.29933 16 : 1.05162 0.886522 17 : 0.866277 1.77799 18 : 0.791952 1.10063 19 : 0.8313 1.59303 POLYGON_SAMPLE_TEST Normal end of execution. R8_CHOOSE_TEST Python version: 3.6.5 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_GAMMA_LOG_TEST: Python version: 3.6.5 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_UNIFORM_01_TEST Python version: 3.6.5 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. R8MAT_PRINT_TEST Python version: 3.6.5 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 Python version: 3.6.5 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_TRANSPOSE_PRINT_TEST Python version: 3.6.5 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 Python version: 3.6.5 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_AB_TEST Python version: 3.6.5 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. R8VEC_PRINT_TEST Python version: 3.6.5 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_UNIFORM_01_TEST Python version: 3.6.5 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. TRIANGLE_AREA_TEST Python version: 3.6.5 TRIANGLE_AREA computes the area of a triangle. (XA,YA) = (0,1) (XB,YB) = (0,0) (XC,YC) = (1,0) Triangle area is 0.5 TRIANGLE_AREA_TEST Normal end of execution. POLYGON_MONTE_CARLO_TESTS: Normal end of execution. Thu Sep 13 12:59:33 2018