07-Jan-2022 19:05:42 disk_monte_carlo_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test disk_monte_carlo(). disk_area_test(): DISK_AREA() computes the area of a disk with center = (CX,CY) and radius R. ( CX CY ) R Area ( 3.147237, 4.057919) 0.126987 0.050660 ( 4.133759, 1.323592) 0.097540 0.029890 (-2.215018, 0.468815) 0.957507 2.880273 ( 4.648885,-3.423869) 0.970593 2.959538 ( 4.571669,-0.146244) 0.800280 2.012029 (-3.581137,-0.782387) 0.915736 2.634450 ( 2.922073, 4.594924) 0.655741 1.350872 (-4.642883, 3.491293) 0.933993 2.740548 ( 1.787352, 2.577401) 0.743132 1.734932 (-1.077730, 1.554779) 0.171187 0.092064 disk_sample_test(): Use DISK_SAMPLE to estimate integrals in the disk with center (0,0) and radius 1 N 1 X^2 Y^2 X^4 X^2Y^2 Y^4 X^6 1 3.14159 0.326187 0.543793 0.0338674 0.0564611 0.0941275 0.0035164 2 3.14159 1.45503 0.535674 1.2845 0.0759347 0.13988 1.16052 4 3.14159 0.784118 1.09015 0.384141 0.140281 0.56575 0.223822 8 3.14159 0.725655 0.781861 0.323565 0.190722 0.303619 0.168712 16 3.14159 0.994642 0.575304 0.607202 0.156937 0.229113 0.453361 32 3.14159 0.680914 0.936625 0.278811 0.124427 0.494359 0.150158 64 3.14159 0.789432 0.703302 0.407933 0.107775 0.321545 0.266741 128 3.14159 0.797829 0.667635 0.431056 0.110999 0.321297 0.286183 256 3.14159 0.753492 0.760708 0.34645 0.129588 0.364101 0.201314 512 3.14159 0.867925 0.723513 0.452557 0.134175 0.346828 0.290195 1024 3.14159 0.749269 0.77095 0.35679 0.127772 0.377216 0.216113 2048 3.14159 0.783061 0.780942 0.391527 0.127086 0.390176 0.2467 4096 3.14159 0.779521 0.783233 0.382094 0.13555 0.389055 0.234046 8192 3.14159 0.768959 0.79398 0.383035 0.130975 0.396183 0.239184 16384 3.14159 0.787558 0.792046 0.396957 0.13012 0.399438 0.250187 32768 3.14159 0.78504 0.784649 0.393245 0.130671 0.392056 0.246241 65536 3.14159 0.781715 0.788883 0.38987 0.131039 0.3951 0.243211 Exact 3.14159 0.785398 0.785398 0.392699 0.1309 0.392699 0.245437 disk_sample_test(): Use DISK_SAMPLE to estimate integrals in the disk with center (1,0) and radius 1 N 1 X^2 Y^2 X^4 X^2Y^2 Y^4 X^6 1 3.14159 0.796245 0.0346231 0.20181 0.00877532 0.000381577 0.0511494 2 3.14159 3.62171 0.553115 8.28567 1.19231 0.172228 19.0293 4 3.14159 4.9703 1.08851 12.6121 1.54954 0.559819 38.3129 8 3.14159 3.10645 0.783974 5.30852 0.633536 0.380225 11.0337 16 3.14159 4.59129 0.979801 9.15061 1.35369 0.518862 21.5296 32 3.14159 4.06105 0.671115 9.26581 0.805022 0.305441 26.0348 64 3.14159 3.8882 0.741137 7.84568 0.943981 0.367031 19.0271 128 3.14159 3.54906 0.726753 7.41027 0.799679 0.334407 19.638 256 3.14159 4.20072 0.769587 9.44712 0.912529 0.394017 25.8388 512 3.14159 3.79636 0.782112 7.65251 0.885719 0.388094 18.7879 1024 3.14159 3.9142 0.796525 8.17926 0.914309 0.415581 20.9647 2048 3.14159 3.96707 0.777033 8.2436 0.88819 0.392799 20.8947 4096 3.14159 4.00182 0.782215 8.49537 0.926478 0.393456 21.9068 8192 3.14159 3.97406 0.797032 8.4137 0.932483 0.399846 21.6525 16384 3.14159 3.91165 0.78721 8.20007 0.919793 0.393084 20.9027 32768 3.14159 3.90159 0.787058 8.17195 0.914711 0.395715 20.8357 65536 3.14159 3.94337 0.786526 8.27971 0.922904 0.393137 21.1075 disk_sample_test(): Use DISK_SAMPLE to estimate integrals in the disk with center (1,2) and radius 3 N 1 X^2 Y^2 X^4 X^2Y^2 Y^4 X^6 1 28.2743 6.13851 73.1488 1.3327 15.881 189.244 0.289337 2 28.2743 78.499 404.657 317.088 1312.39 6151.39 1430.88 4 28.2743 173.421 179.157 2055.82 592.775 1853.49 29568.7 8 28.2743 140.318 259.291 1208.8 1030.64 3042.17 11306.8 16 28.2743 76.9657 159.983 376.5 490.863 2328.34 2136.41 32 28.2743 80.1825 184.378 595.588 457.564 2319.61 5668.34 64 28.2743 84.1033 190.263 508.218 518.183 2658.7 3927.88 128 28.2743 91.008 176.223 696.638 527.919 2203.56 6887.93 256 28.2743 95.9007 186.463 750.071 555.792 2434.33 7560.22 512 28.2743 89.4797 166.592 692.531 455.221 2171.68 7025.07 1024 28.2743 96.6562 169.283 768.25 544.828 2086.2 7944.07 2048 28.2743 89.595 176.275 671.202 529.519 2273.9 6589.09 4096 28.2743 90.1066 172.847 676.785 510.637 2214.58 6630.57 8192 28.2743 91.2656 178.405 684.762 528.72 2312.11 6708.01 16384 28.2743 91.617 178.797 689.11 535.235 2316.55 6773.07 32768 28.2743 92.5368 177.187 706.107 531.5 2271.46 7026.63 65536 28.2743 92.0139 177.037 698.653 524.52 2259.43 6919.86 disk_monte_carlo_test(): Normal end of execution. 07-Jan-2022 19:05:42