13 July 2018 10:21:07 AM TRIANGLE_MONTE_CARLO_TEST C++ version Test the TRIANGLE_MONTE_CARLO library. TEST01 Sample using TRIANGLE_UNIT_SAMPLE_01 Integrate TRIANGLE_UNIT_INTEGRAND_03 Integration region is the unit triangle. Use an increasing number of points P_NUM. Note that the sample routine is a "bad" sampler. P_NUM X^2 X*Y Y^2 1 0.0856467 0.0225517 0.00593808 2 0.00384242 0.0252114 0.170507 4 0.148535 0.0485479 0.0447759 8 0.0328484 0.0288012 0.0828162 16 0.0586058 0.0524184 0.0875281 32 0.0768643 0.0464849 0.0729842 64 0.0846448 0.0427915 0.0668663 128 0.0661809 0.0478704 0.0731279 256 0.0754074 0.0489247 0.0766501 512 0.069244 0.0483085 0.0742535 1024 0.0737237 0.0460079 0.0685992 2048 0.0723518 0.0469553 0.0726841 4096 0.0707143 0.0472549 0.0728628 8192 0.0718357 0.0480224 0.0718391 16384 0.0719824 0.0473759 0.0706964 32768 0.0719215 0.0473434 0.0710155 65536 0.071517 0.0473644 0.0718834 TEST02 Sample using TRIANGLE_UNIT_SAMPLE_02 Integrate TRIANGLE_UNIT_INTEGRAND_03 Integration region is the unit triangle. Use an increasing number of points P_NUM. Note that the sample routine is a good sampler. P_NUM X^2 X*Y Y^2 1 0.0152663 0.0682852 0.305435 2 0.10549 0.0705161 0.0503868 4 0.0958774 0.0375729 0.053814 8 0.154186 0.0425061 0.0800974 16 0.0675884 0.0238646 0.0394667 32 0.108318 0.0511775 0.091483 64 0.0731985 0.0386438 0.0985013 128 0.079182 0.0429998 0.0922287 256 0.0791029 0.0445601 0.092125 512 0.0837578 0.0414703 0.0779272 1024 0.0835443 0.0412144 0.0820827 2048 0.0850973 0.041066 0.0798672 4096 0.0852214 0.041875 0.0818751 8192 0.0827501 0.0417495 0.0825969 16384 0.0833142 0.0421012 0.0837337 32768 0.0826377 0.0415618 0.0831701 65536 0.0834035 0.0416841 0.0831684 TEST03 Sample using TRIANGLE_UNIT_SAMPLE_03 Integrate TRIANGLE_UNIT_INTEGRAND_03 Integration region is the unit triangle. Use an increasing number of points P_NUM. Note that the sample routine is a good sampler. P_NUM X^2 X*Y Y^2 1 0.0228113 0.00235863 0.000243876 2 0.0994747 0.0587715 0.153654 4 0.0164705 0.0154508 0.0767636 8 0.0719864 0.0361502 0.194047 16 0.110788 0.0519113 0.0487132 32 0.0873191 0.0313781 0.0834326 64 0.0729956 0.0466815 0.0988937 128 0.0885276 0.0405404 0.0702824 256 0.0783893 0.0409337 0.0845554 512 0.081068 0.0433186 0.0899368 1024 0.0842071 0.0420038 0.0812736 2048 0.0842428 0.042013 0.0829048 4096 0.0817463 0.0415883 0.0854145 8192 0.0826575 0.0418488 0.0836995 16384 0.0832585 0.0411709 0.0826163 32768 0.0825212 0.0418035 0.0841525 65536 0.0832759 0.0415416 0.0831207 TEST04 Sample using TRIANGLE_UNIT_SAMPLE_04 Integrate TRIANGLE_UNIT_INTEGRAND_03 Integration region is the unit triangle. Use an increasing number of points P_NUM. Note that the sample routine is a good sampler. P_NUM X^2 X*Y Y^2 1 0.00568535 0.0462729 0.376613 2 0.160594 0.0461905 0.0150516 4 0.0106029 0.0314038 0.157445 8 0.106672 0.0709128 0.0858429 16 0.121936 0.0319953 0.0466116 32 0.0638214 0.036786 0.100393 64 0.0892578 0.0398964 0.086867 128 0.0902846 0.0427785 0.0799628 256 0.0924178 0.037899 0.0729766 512 0.0855997 0.042156 0.0775111 1024 0.080565 0.0414693 0.0912844 2048 0.084655 0.0417314 0.0817356 4096 0.0827076 0.0414299 0.0829609 8192 0.0829515 0.0414507 0.0827345 16384 0.0836145 0.0419246 0.0831319 32768 0.0826509 0.0419187 0.084645 65536 0.0839347 0.0418096 0.0833144 TEST05 Sample using TRIANGLE_UNIT_SAMPLE_01 Integrate TRIANGLE_UNIT_INTEGRAND_USER Integration region is over a general triangle. Use an increasing number of points P_NUM. Note that the sample routine is a "bad" sampler. Triangle vertices: Row: 1 2 Col 1 4 1 2 8 3 3 0 9 P_NUM 1 20 50.5465 100.702 127.748 254.508 507.049 643.225 3238.72 2 20 99.9678 96.5276 503.498 478.674 469.675 2392 11456.5 4 20 73.719 75.474 333.971 216.488 369.682 864.602 2700.47 8 20 71.7765 103.766 306.764 343.555 561.73 1356.36 6243.55 16 20 84.8133 86.3321 395.771 335.738 411.335 1469.37 5994.76 32 20 80.1085 84.7353 355.034 318.834 385.607 1346.68 5482.79 64 20 77.5628 86.7989 334.897 310.711 419.677 1285.06 5386.18 128 20 81.0627 87.1066 352.111 335.944 406.469 1390.88 5938.29 256 20 82.3144 84.7719 369.732 324.925 397.184 1381.78 5672.3 512 20 80.7069 86.7144 358.075 325.117 410.554 1365.95 5644.47 1024 20 78.6527 87.2111 340.577 319.85 413.986 1316.16 5490.34 2048 20 80.1846 86.668 352.582 324.215 410.217 1352.95 5631.36 4096 20 80.226 86.6905 352.758 325.286 407.839 1358.23 5647.72 8192 20 80.2536 86.3862 352.82 323.363 406.705 1346.3 5580.3 16384 20 79.7458 86.8178 348.334 323.074 410.721 1337.35 5575.93 32768 20 79.7185 86.7882 349.029 322.408 410.367 1336.69 5557.21 65536 20 79.9958 86.7475 351.045 323.682 409.929 1345.56 5597.07 TEST06 Sample using TRIANGLE_UNIT_SAMPLE_02 Integrate TRIANGLE_UNIT_INTEGRAND_USER Integration region is over a general triangle. Use an increasing number of points P_NUM. Note that the sample routine is a "good" sampler. Triangle vertices: Row: 1 2 Col 1 4 1 2 8 3 3 0 9 P_NUM 1 20 139.032 58.2525 966.494 404.948 169.667 2815.03 8199.13 2 20 83.255 72.0698 377.025 269.308 290.65 1103.01 3637.05 4 20 70.4608 87.1698 295.312 275.845 416.275 1086.17 4317.76 8 20 82.8543 71.5117 412.544 244.922 340.49 1111.23 3523.95 16 20 59.6212 106.044 205.385 290.298 610.282 940.681 4651.34 32 20 88.2157 74.429 434.534 299.502 325.273 1402.95 4994.15 64 20 83.268 87.5244 397.939 330.569 433.061 1485.62 6139.74 128 20 82.8684 84.8618 396.861 316.024 408.147 1423.76 5642.14 256 20 83.1384 84.9082 400.54 313.262 414.621 1397.36 5435.56 512 20 78.1067 87.8446 359.263 300.154 447.084 1276.51 5051.93 1024 20 79.2346 86.8406 369.109 303.501 433.466 1319.59 5202.93 2048 20 78.8995 87.0458 364.051 303.274 437.376 1303.06 5191.92 4096 20 79.9876 86.208 371.342 306.205 428.61 1326.02 5272.98 8192 20 79.8117 86.8445 371.287 306.841 434.299 1328.3 5290.77 16384 20 80.3413 86.3568 375.458 307.465 429.951 1339.49 5314.95 32768 20 79.8023 86.9517 372.202 306.461 436.045 1329.97 5284.78 65536 20 80.023 86.6366 373.001 307.039 432.801 1333.66 5305.69 TEST07 Sample using TRIANGLE_UNIT_SAMPLE_03 Integrate TRIANGLE_UNIT_INTEGRAND_USER Integration region is over a general triangle. Use an increasing number of points P_NUM. Note that the sample routine is a "good" sampler. Triangle vertices: Row: 1 2 Col 1 4 1 2 8 3 3 0 9 P_NUM 1 20 20.6212 143.175 21.2616 147.621 1024.95 152.206 1089.61 2 20 108.611 62.1178 607.473 348.282 199.719 2005.64 6804.79 4 20 63.5259 119.598 246.61 348.878 744.792 1238.97 6517.76 8 20 104.755 74.9768 635.375 350.834 332.111 2047.44 7052.17 16 20 76.3687 82.8975 328.503 269.252 425.259 1067.8 3999.23 32 20 76.3334 89.7406 349.8 304.591 459.503 1317.02 5372.82 64 20 84.9668 84.7841 419.39 317.072 414.647 1465.32 5542.69 128 20 76.0365 87.8599 340.364 293.369 444.99 1213.31 4826.66 256 20 79.2684 87.6123 371.421 306.644 436.643 1326.97 5256.34 512 20 82.516 85.5062 393.017 313.717 422.499 1397.93 5518.74 1024 20 79.6389 86.8143 369.483 305.066 436.556 1313.33 5237.95 2048 20 80.1308 86.3715 373.705 306.283 431.061 1331.61 5285.39 4096 20 80.6498 86.6652 377.445 310.826 431.94 1359.61 5428.64 8192 20 80.1657 86.6587 374.304 307.679 432.686 1338.74 5320.96 16384 20 79.6013 86.9745 370.181 306.296 435.746 1326.73 5281.05 32768 20 80.1871 86.7342 375.261 307.336 434.175 1339.17 5313.63 65536 20 79.9376 86.7475 372.432 307.027 433.854 1333.21 5304.57 TEST08 Sample using TRIANGLE_UNIT_SAMPLE_04 Integrate TRIANGLE_UNIT_INTEGRAND_USER Integration region is over a general triangle. Use an increasing number of points P_NUM. Note that the sample routine is a "good" sampler. Triangle vertices: Row: 1 2 Col 1 4 1 2 8 3 3 0 9 P_NUM 1 20 147.392 58.7923 1086.23 433.277 172.827 3193.09 9386.45 2 20 72.0165 70.0637 259.56 251.099 251.312 900.73 3201.59 4 20 88.2741 100.79 490.238 368.06 568.683 1770.71 7122.47 8 20 93.8021 66.584 469.565 293.248 247.51 1394.9 4518.59 16 20 69.0803 88.4406 279.273 263.527 474.069 969.053 3953.53 32 20 81.1878 89.6076 392.025 326.757 442.145 1478.26 5906.28 64 20 81.5179 84.7898 381.639 312.191 413.007 1397.46 5598.43 128 20 80.4416 84.2906 372 304.302 407.776 1313.83 5170.56 256 20 76.1929 88.2418 342.989 293.922 455.56 1227.51 4973.93 512 20 78.6131 86.9495 361.131 300.74 437.722 1278.92 5080.14 1024 20 82.3702 85.8737 391.411 316.971 422.665 1410.74 5644.45 2048 20 79.8966 86.3661 370.255 306.884 429.253 1327.43 5291.01 4096 20 79.8292 86.6849 371.373 307.479 430.613 1334.7 5311.06 8192 20 79.6575 87.0004 371.003 305.983 436.672 1325.37 5266.29 16384 20 80.094 86.552 373.658 306.631 432.69 1333.52 5294.15 32768 20 80.4128 86.5072 376.9 307.85 431.572 1345.21 5329.84 65536 20 80.1332 86.4053 374.036 306.629 430.69 1333.91 5292.64 TRIANGLE_MONTE_CARLO_TEST Normal end of execution. 13 July 2018 10:21:07 AM