Tue May 20 21:19:37 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 8 0 1.78165 1.71806 0.064 8 6 0.0154609 0.0153398 0.00012 8 10 0.0033798 0.00335558 2.4e-05 8 6 0.0154609 0.0153398 0.00012 4 10 0.0269226 0.0276117 0.00069 0 4 2.28974 2.35619 0.066 0 4 2.28974 2.35619 0.066 8 2 0.175697 0.171806 0.0039 4 2 0.397205 0.392699 0.0045 0 4 2.28974 2.35619 0.066 4 10 0.0269226 0.0276117 0.00069 4 6 0.073112 0.0736311 0.00052 10 0 1.60595 1.54625 0.06 2 6 0.237833 0.245437 0.0076 8 6 0.0154609 0.0153398 0.00012 2 6 0.237833 0.245437 0.0076 4 8 0.0422868 0.0429515 0.00066 6 8 0.0153643 0.0153398 2.4e-05 2 2 0.782347 0.785398 0.0031 6 8 0.0153643 0.0153398 2.4e-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 3.878606881 2.404578426 2.394261923 1.484344958 0.9202334685 1.477976586 2 6.283185307 1.735836729 4.547348578 0.95738927 0.7784474591 3.768901119 0.5285150664 4 6.283185307 2.464459374 3.818725933 1.669130655 0.795328719 3.023397214 1.281344831 8 6.283185307 3.373781933 2.909403375 2.734332013 0.6394499195 2.269953455 2.432674507 16 6.283185307 3.089781923 3.193403384 2.278739973 0.8110419503 2.382361433 1.810709296 32 6.283185307 2.876747549 3.406437758 2.166892875 0.7098546738 2.696583084 1.797317534 64 6.283185307 2.892170445 3.391014862 2.109487444 0.7826830012 2.608331861 1.708371878 128 6.283185307 3.019775176 3.263410132 2.223434557 0.7963406181 2.467069514 1.818395873 256 6.283185307 2.971807276 3.311378031 2.164493539 0.8073137366 2.504064294 1.766368866 512 6.283185307 3.184960288 3.098225019 2.385024094 0.7999361944 2.298288825 1.986676092 1024 6.283185307 3.036407027 3.24677828 2.234960838 0.8014461895 2.44533209 1.842138011 2048 6.283185307 3.07635087 3.206834437 2.276925971 0.799424899 2.407409538 1.884290292 4096 6.283185307 3.161581092 3.121604215 2.37251852 0.7890625724 2.332541643 1.975107499 8192 6.283185307 3.156800657 3.12638465 2.367476743 0.7893239146 2.337060735 1.971423748 16384 6.283185307 3.144574158 3.138611149 2.355136307 0.7894378509 2.349173298 1.958796993 32768 6.283185307 3.144370179 3.138815128 2.356987073 0.7873831058 2.351432022 1.96347067 65536 6.283185307 3.135091199 3.148094108 2.350029641 0.7850615576 2.363032551 1.957665247 Exact 6.283185307 3.141592654 3.141592654 2.35619449 0.7853981634 2.35619449 1.963495408 circle_monte_carlo_test(): Normal end of execution. Tue May 20 21:19:39 2025