Wed Oct 8 07:27:45 2025 circle_monte_carlo_test(): python version: 3.10.12 numpy version: 1.26.4 Test circle_monte_carlo(). circle01_length_test(): Python version: 3.10.12 circle01_length() returns the length of the unit circle. circle01_length() = 6.28319 circle01_monomial_integral_test(): Python version: 3.10.12 circle01_monomial_integral() returns the value of the integral of a monomial over the unit circle in 2D. Compare with a Monte Carlo estimate. Number of sample points used is 4192 If any exponent is odd, the integral is zero. We restrict this test to randomly chosen even exponents. Ex Ey MC-Estimate Exact Error 0 4 2.33255 2.35619 0.024 8 8 0.00683924 0.00671117 0.00013 4 6 0.0742721 0.0736311 0.00064 6 2 0.246922 0.245437 0.0015 10 4 0.0279502 0.0276117 0.00034 6 6 0.031175 0.0306796 0.0005 0 8 1.69373 1.71806 0.024 10 8 0.00343208 0.00335558 7.6e-05 10 10 0.00154243 0.00151001 3.2e-05 6 8 0.0155299 0.0153398 0.00019 8 0 1.72795 1.71806 0.0099 4 8 0.0430971 0.0429515 0.00015 0 10 1.5231 1.54625 0.023 4 4 0.149043 0.147262 0.0018 8 2 0.172152 0.171806 0.00035 2 10 0.127523 0.128854 0.0013 6 10 0.00869068 0.00862864 6.2e-05 2 6 0.244893 0.245437 0.00054 6 10 0.00869068 0.00862864 6.2e-05 10 10 0.00154243 0.00151001 3.2e-05 circle01_sample_ergodic_test(): Python version: 3.10.12 circle01_sample_ergodic() ergodically samples the unit circle. Use it to estimate integrals. N 1 X^2 Y^2 X^4 X^2Y^2 Y^4 X^6 1 6.283185307 6.283185307 0 6.283185307 0 0 6.283185307 2 6.283185307 4.849716988 1.43346832 4.070321825 0.7793951631 0.6540731564 3.646554649 4 6.283185307 3.018369913 3.264815394 2.250524732 0.7678451818 2.496970212 1.902971277 8 6.283185307 3.049675381 3.233509926 2.300804618 0.7488707628 2.484639164 1.958708144 16 6.283185307 3.117519265 3.165666042 2.379081125 0.7384381403 2.427227902 2.016396847 32 6.283185307 3.219061499 3.064123808 2.43707687 0.781984629 2.282139179 2.047919031 64 6.283185307 3.16392701 3.119258297 2.383917095 0.780009915 2.339248382 1.993699361 128 6.283185307 3.16441952 3.118765787 2.385001988 0.7794175322 2.339348255 1.995559912 256 6.283185307 3.156056777 3.12712853 2.371065206 0.7849915706 2.34213696 1.977888379 512 6.283185307 3.140118921 3.143066386 2.355499644 0.7846192776 2.358447108 1.963715413 1024 6.283185307 3.141618707 3.1415666 2.356986312 0.7846323959 2.356934204 1.964665182 2048 6.283185307 3.143281658 3.139903649 2.357892798 0.78538886 2.354514789 1.965158523 4096 6.283185307 3.141457119 3.141728188 2.356083522 0.7853735969 2.356354591 1.96343864 8192 6.283185307 3.141500541 3.141684766 2.356149808 0.785350733 2.356334033 1.963507282 16384 6.283185307 3.141591557 3.14159375 2.35624137 0.7853501875 2.356243562 1.963566493 32768 6.283185307 3.141695988 3.141489319 2.35629807 0.7853979182 2.356091401 1.963597306 65536 6.283185307 3.141585849 3.141599458 2.356188483 0.7853973656 2.356202093 1.963491738 Exact 6.283185307 3.141592654 3.141592654 2.35619449 0.7853981634 2.35619449 1.963495408 circle01_sample_random_test(): circle01_sample_random() randomly samples the unit circle. Use it to estimate integrals. N 1 X^2 Y^2 X^4 X^2Y^2 Y^4 X^6 1 6.283185307 0.1178138373 6.16537147 0.002209086565 0.1156047507 6.049766719 4.142181908e-05 2 6.283185307 2.522200716 3.760984591 1.170236439 1.351964277 2.409020315 0.5964237101 4 6.283185307 1.934081952 4.349103355 1.028487231 0.9055947208 3.443508634 0.6459250091 8 6.283185307 3.053257337 3.22992797 1.960982389 1.092274948 2.137653022 1.391912683 16 6.283185307 3.125239496 3.157945811 2.149121489 0.976118007 2.181827804 1.62682788 32 6.283185307 2.821909762 3.461275545 2.196748526 0.6251612364 2.836114309 1.897762431 64 6.283185307 3.510851649 2.772333658 2.726628712 0.7842229368 1.988110722 2.309672582 128 6.283185307 2.981729067 3.30145624 2.193486117 0.7882429505 2.513213289 1.795145623 256 6.283185307 3.135440797 3.14774451 2.327906513 0.8075342848 2.340210225 1.919992078 512 6.283185307 3.161921848 3.12126346 2.364464899 0.7974569481 2.323806512 1.968670766 1024 6.283185307 3.067640551 3.215544756 2.316972991 0.7506675603 2.464877195 1.940721952 2048 6.283185307 3.133783565 3.149401743 2.36123081 0.7725527545 2.376848988 1.978208987 4096 6.283185307 3.116594647 3.16659066 2.326078383 0.7905162647 2.376074395 1.93037703 8192 6.283185307 3.169383431 3.113801876 2.395370206 0.774013225 2.339788651 2.005485105 16384 6.283185307 3.173065497 3.11011981 2.384104544 0.7889609533 2.321158857 1.987465198 32768 6.283185307 3.155091696 3.128093611 2.372634422 0.7824572743 2.345636337 1.979603875 65536 6.283185307 3.149744203 3.133441104 2.363320904 0.7864232992 2.347017805 1.969850017 Exact 6.283185307 3.141592654 3.141592654 2.35619449 0.7853981634 2.35619449 1.963495408 circle_monte_carlo_test(): Normal end of execution. Wed Oct 8 07:27:47 2025