08-Nov-2022 14:20:40 triangle_monte_carlo_test() MATLAB/Octave version 4.2.2 Test triangle_monte_carlo(). triangle_monte_carlo_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.069243 0.031216 0.014072 2 0.044909 0.066899 0.102496 4 0.025641 0.026961 0.044284 8 0.067409 0.043189 0.122197 16 0.082422 0.040033 0.052378 32 0.075740 0.053833 0.069795 64 0.070596 0.049630 0.070318 128 0.077709 0.047069 0.072523 256 0.079535 0.046813 0.070100 512 0.074904 0.048339 0.076545 1024 0.070987 0.045988 0.070195 2048 0.073479 0.048044 0.072015 4096 0.070361 0.047955 0.072402 8192 0.072016 0.047652 0.072330 16384 0.071093 0.047926 0.072154 32768 0.071924 0.047480 0.071010 65536 0.071706 0.047500 0.071730 triangle_monte_carlo_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.005789 0.036471 0.229749 2 0.371022 0.041352 0.004644 4 0.139076 0.057475 0.153607 8 0.077557 0.046185 0.079864 16 0.048470 0.041398 0.114044 32 0.065205 0.036907 0.088580 64 0.093951 0.034080 0.076015 128 0.082349 0.040947 0.089813 256 0.088721 0.043791 0.092058 512 0.083422 0.043455 0.080606 1024 0.086295 0.042592 0.080886 2048 0.079511 0.041779 0.085383 4096 0.085974 0.041852 0.085635 8192 0.083560 0.042183 0.084151 16384 0.083375 0.041257 0.083154 32768 0.082412 0.041724 0.084322 65536 0.083163 0.041701 0.083561 triangle_monte_carlo_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.000554 0.002358 0.010033 2 0.148563 0.078118 0.122766 4 0.067342 0.061614 0.081004 8 0.102005 0.051773 0.140818 16 0.105236 0.033923 0.080132 32 0.100633 0.030027 0.077371 64 0.072686 0.042830 0.090045 128 0.099178 0.046965 0.078982 256 0.086038 0.041788 0.078109 512 0.088008 0.039802 0.079218 1024 0.080801 0.041010 0.081518 2048 0.085614 0.040824 0.083700 4096 0.083017 0.041092 0.082904 8192 0.083249 0.041606 0.085566 16384 0.082315 0.041950 0.083280 32768 0.083466 0.041533 0.083742 65536 0.083297 0.041503 0.083136 triangle_monte_carlo_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.089028 0.079924 0.071751 2 0.084576 0.016853 0.004952 4 0.100610 0.043989 0.026706 8 0.059660 0.040096 0.063474 16 0.080867 0.052698 0.076703 32 0.116814 0.051445 0.101893 64 0.089757 0.043179 0.101726 128 0.078971 0.039391 0.096922 256 0.082964 0.041226 0.083120 512 0.075036 0.041955 0.089217 1024 0.083324 0.043018 0.082350 2048 0.082024 0.039822 0.079736 4096 0.083755 0.040633 0.081064 8192 0.082199 0.041605 0.083060 16384 0.082926 0.041859 0.082614 32768 0.083044 0.041651 0.083526 65536 0.084129 0.041689 0.083302 triangle_monte_carlo_test05(): Sample using triangle_unit_sample_01() Integrate triangle_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.000000 64.697451 114.153476 209.288009 369.271945 651.550799 1194.547683 6818.088485 2 20.000000 89.758791 89.451758 419.527258 387.454217 411.820519 1750.711411 7514.435693 4 20.000000 104.183026 72.780647 564.678170 366.204490 291.890089 1915.286457 7200.209054 8 20.000000 88.624872 89.921601 421.505904 382.578197 415.755248 1747.400787 7475.174467 16 20.000000 81.383446 90.351086 358.691586 345.650004 435.430391 1437.586444 6271.110507 32 20.000000 86.058087 78.084042 413.230925 301.975003 351.803815 1340.384079 4923.202664 64 20.000000 80.839464 84.971869 362.624347 315.543746 399.270514 1332.782862 5298.842027 128 20.000000 79.655121 89.456440 348.114881 332.508920 429.597083 1374.010867 5830.254018 256 20.000000 78.039277 85.817092 335.771824 313.540682 399.248004 1281.112822 5284.737072 512 20.000000 78.806397 87.334271 338.334814 324.515031 410.870282 1328.502867 5625.248466 1024 20.000000 78.569813 87.686457 339.259076 321.470930 418.600673 1314.924116 5534.932275 2048 20.000000 79.658251 87.153983 349.310592 323.087800 413.308381 1340.664778 5567.887183 4096 20.000000 79.860344 87.422653 349.912067 325.839520 415.118240 1351.673670 5658.144407 8192 20.000000 80.099665 86.692338 351.184056 323.876011 409.787183 1345.589854 5603.039228 16384 20.000000 79.878235 86.508390 350.434128 321.961748 408.126906 1336.597515 5540.530464 32768 20.000000 80.074995 86.789749 351.598951 324.193125 410.393128 1348.385242 5612.873366 65536 20.000000 79.848374 86.699252 349.813631 322.817261 409.555182 1339.905504 5570.158891 triangle_monte_carlo_test06(): Sample using triangle_unit_sample_02() Integrate triangle_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.000000 63.723558 113.577210 203.034592 361.877196 644.989132 1153.005123 6547.755250 2 20.000000 103.996196 42.753399 550.158407 233.425661 104.541036 1291.660478 3369.950187 4 20.000000 76.540944 91.432349 325.806591 300.194962 499.423793 1098.304931 4609.606412 8 20.000000 51.699478 110.316189 159.782632 251.537351 686.503747 724.124189 3657.368643 16 20.000000 88.517375 69.980189 426.976729 296.411386 274.412180 1378.738484 4893.185261 32 20.000000 74.243718 91.126107 322.178022 305.989191 461.041824 1233.068781 5226.918898 64 20.000000 83.947439 84.010592 393.750241 325.218461 397.082133 1452.884662 5824.999202 128 20.000000 78.182626 86.286525 353.433044 299.703882 431.680357 1257.314315 5058.575771 256 20.000000 78.993551 85.268114 363.422283 295.145250 425.966458 1256.195298 4904.678347 512 20.000000 79.436581 88.906285 368.824439 311.216290 454.533511 1344.796718 5428.309756 1024 20.000000 83.400938 84.369508 398.664686 315.001523 409.208047 1412.327087 5528.048514 2048 20.000000 79.808600 87.161862 372.454362 308.920963 435.072423 1342.780272 5362.382041 4096 20.000000 80.249620 86.366957 374.719048 307.327990 430.168360 1336.762199 5305.888153 8192 20.000000 80.691640 86.120316 378.561850 308.275745 427.798702 1350.693018 5353.418948 16384 20.000000 80.015401 87.011014 374.377150 307.525511 436.289965 1340.687530 5326.735156 32768 20.000000 80.083323 86.505537 373.379511 306.914390 431.631794 1334.699851 5303.591478 65536 20.000000 79.885789 86.600710 372.065439 305.922693 432.968520 1327.227187 5266.608880 triangle_monte_carlo_test07(): Sample using triangle_unit_sample_03() Integrate triangle_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.000000 98.215595 47.857329 482.315154 235.016803 114.516198 1154.115755 2761.644881 2 20.000000 103.072779 86.244887 599.196709 416.709314 383.246821 2297.693873 9013.780043 4 20.000000 87.075524 72.445904 403.968658 317.939174 283.090842 1490.584087 5808.757287 8 20.000000 74.737268 95.252251 306.007326 327.937522 513.111352 1278.491057 5858.255051 16 20.000000 87.887935 80.497353 414.153859 329.965329 357.825017 1469.057501 5741.924095 32 20.000000 82.395195 85.899193 394.560836 314.389172 416.236937 1397.724064 5494.568021 64 20.000000 85.243272 78.904589 416.983780 305.276346 359.099057 1422.563398 5303.836538 128 20.000000 77.723814 88.322818 354.302625 301.842501 449.907712 1281.574982 5146.398869 256 20.000000 80.594760 86.612381 379.348193 310.223488 428.809024 1359.770677 5367.434241 512 20.000000 78.088361 88.154669 359.623438 300.969383 449.011072 1276.883235 5072.907212 1024 20.000000 79.984733 85.956384 376.064086 302.792309 426.906776 1326.564486 5195.311262 2048 20.000000 81.430278 85.442286 383.527004 311.088670 417.989797 1371.617614 5422.100474 4096 20.000000 80.233964 86.816715 376.789636 307.263827 434.706409 1343.717286 5315.912590 8192 20.000000 80.287182 86.358263 375.705778 307.604883 429.441685 1342.041544 5326.931187 16384 20.000000 80.043493 86.803966 373.792124 306.957129 435.023377 1335.189525 5303.550390 32768 20.000000 80.285103 86.363962 375.492959 307.244324 429.952380 1339.683084 5311.634869 65536 20.000000 80.095803 86.716399 374.266285 307.193488 433.819797 1337.981814 5315.075123 triangle_monte_carlo_test08(): Sample using triangle_unit_sample_04() Integrate triangle_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.000000 148.257405 60.478767 1099.012902 448.321252 182.884063 3323.347262 10049.597244 2 20.000000 83.262123 87.129247 399.080317 362.919748 379.575987 1740.172361 7587.953443 4 20.000000 88.909691 93.950800 501.123713 340.808585 504.709271 1833.273233 6770.827974 8 20.000000 71.908555 97.181353 332.564729 281.574395 562.023382 1163.129659 4632.854468 16 20.000000 78.796194 88.658630 373.551452 308.798401 451.489088 1351.949553 5344.132382 32 20.000000 79.850525 91.440005 372.471939 326.748767 470.198499 1428.759449 6005.484648 64 20.000000 84.011477 82.452736 405.425365 314.845711 385.570302 1429.705538 5503.792254 128 20.000000 76.991536 89.942050 353.847191 300.248990 465.887603 1277.577308 5119.442614 256 20.000000 82.029750 81.001059 383.237193 299.023099 380.202390 1310.823373 5011.235471 512 20.000000 78.589934 87.652145 360.980139 304.375906 439.861129 1292.461225 5162.272804 1024 20.000000 79.674229 86.652902 371.168902 305.449471 433.624468 1323.595359 5257.452093 2048 20.000000 78.995112 88.048035 366.502519 306.449570 447.275562 1321.794345 5302.340349 4096 20.000000 79.232233 87.813675 367.590340 306.765852 444.490112 1321.976218 5289.970374 8192 20.000000 79.846951 86.692230 371.718008 306.530088 432.652984 1329.378622 5276.380988 16384 20.000000 79.711845 86.846007 371.857067 305.261536 435.812904 1324.499902 5252.128616 32768 20.000000 79.879797 86.662854 372.121631 306.214887 433.336823 1329.107234 5280.192262 65536 20.000000 79.889361 86.848688 372.171461 307.140912 434.587499 1333.017251 5306.020368 triangle_monte_carlo_test(): Normal end of execution. 08-Nov-2022 14:21:15