Tue Oct 19 11:25:25 2021 circle_monte_carlo_test(): Python version: 3.6.9 Test circle_monte_carlo(). circle01_length_test(): Python version: 3.6.9 circle01_length() returns the length of the unit circle. circle01_length() = 6.28319 circle01_length_test(): Normal end of execution. circle01_monomial_integral_test(): Python version: 3.6.9 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 8 1.66185 1.71806 0.056 0 2 3.08817 3.14159 0.053 6 2 0.249192 0.245437 0.0038 4 6 0.0741075 0.0736311 0.00048 8 8 0.00678177 0.00671117 7.1e-05 2 6 0.243936 0.245437 0.0015 4 10 0.0276438 0.0276117 3.2e-05 8 4 0.0433653 0.0429515 0.00041 2 10 0.126686 0.128854 0.0022 10 8 0.0033824 0.00335558 2.7e-05 6 2 0.249192 0.245437 0.0038 2 8 0.169829 0.171806 0.002 8 8 0.00678177 0.00671117 7.1e-05 4 10 0.0276438 0.0276117 3.2e-05 10 4 0.0278997 0.0276117 0.00029 2 8 0.169829 0.171806 0.002 6 6 0.0309646 0.0306796 0.00028 2 0 3.19502 3.14159 0.053 2 2 0.790003 0.785398 0.0046 0 4 2.29816 2.35619 0.058 circle01_monomial_integral_test() Normal end of execution. circle01_sample_ergodic_test(): Python version: 3.6.9 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_ergodic_test(): Normal end of execution. circle01_sample_random_test(): Python version: 3.6.9 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 5.226814898 1.056370409 4.348048424 0.8787664733 0.1776039361 3.617025946 2 6.283185307 3.569201917 2.71398339 2.968944949 0.6002569673 2.113726423 2.756106541 4 6.283185307 1.448296166 4.834889141 1.281902851 0.1663933146 4.668495827 1.15758126 8 6.283185307 3.942273158 2.340912149 3.286396264 0.6558768941 1.685035255 2.877227272 16 6.283185307 2.303073228 3.980112079 1.637851822 0.6652214058 3.314890673 1.324933327 32 6.283185307 2.707891512 3.575293795 2.047843727 0.6600477853 2.91524601 1.750039632 64 6.283185307 3.282665016 3.000520291 2.509905555 0.7727594616 2.227760829 2.116102707 128 6.283185307 3.291138352 2.992046955 2.528922928 0.7622154248 2.22983153 2.130414382 256 6.283185307 3.455830967 2.827354341 2.633108087 0.8227228797 2.004631461 2.202799824 512 6.283185307 3.115157798 3.168027509 2.350883654 0.7642741446 2.403753364 1.972763883 1024 6.283185307 2.997864046 3.285321262 2.223438739 0.7744253067 2.510895955 1.846460947 2048 6.283185307 3.086964328 3.196220979 2.295911085 0.7910532428 2.405167736 1.904882873 4096 6.283185307 3.169958984 3.113226323 2.372069119 0.7978898655 2.315336457 1.972660586 8192 6.283185307 3.166282845 3.116902463 2.381879556 0.7844032891 2.332499174 1.989156781 16384 6.283185307 3.126825288 3.156360019 2.333864518 0.7929607708 2.363399248 1.939194393 32768 6.283185307 3.136251037 3.146934271 2.35013281 0.7861182266 2.360816044 1.958349082 65536 6.283185307 3.142270265 3.140915042 2.355524786 0.7867454795 2.354169562 1.962003438 Exact 6.283185307 3.141592654 3.141592654 2.35619449 0.7853981634 2.35619449 1.963495408 circle01_sample_random_test(): Normal end of execution. i4vec_print_test(): Python version: 3.6.9 i4vec_print() prints an I4VEC. Here is an I4VEC: 0 91 1 92 2 93 3 94 i4vec_print_test(): Normal end of execution. i4vec_transpose_print_test() Python version: 3.6.9 i4vec_transpose_print() prints an I4VEC with 5 entries to a row, and an optional title. My array: 1 2 3 4 5 6 7 8 9 10 11 12 i4vec_transpose_print_test(): Normal end of execution. r8mat_print_test(): Python version: 3.6.9 r8mat_print() prints an R8MAT. Here is an R8MAT: Col: 0 1 2 3 4 Row 0 : 11 12 13 14 15 1 : 21 22 23 24 25 2 : 31 32 33 34 35 3 : 41 42 43 44 45 Col: 5 Row 0 : 16 1 : 26 2 : 36 3 : 46 r8mat_print_test(): Normal end of execution. r8mat_print_some_test(): Python version: 3.6.9 r8mat_print_some() prints some of an R8MAT. Here is an R8MAT: Col: 3 4 5 Row 0 : 14 15 16 1 : 24 25 26 2 : 34 35 36 r8mat_print_some_test(): Normal end of execution. r8mat_transpose_print_test() Python version: 3.6.9 r8mat_transpose_print() prints an R8MAT. Here is an R8MAT, transposed: Row: 0 1 2 3 Col 0 : 11 21 31 41 1 : 12 22 32 42 2 : 13 23 33 43 r8mat_transpose_print_test(): Normal end of execution. r8mat_transpose_print_some_test(): Python version: 3.6.9 r8mat_transpose_print_some() prints some of an R8MAT, transposed. R8MAT, rows 0:2, cols 3:5: Row: 0 1 2 Col 3 : 14 24 34 4 : 15 25 35 5 : 16 26 36 r8mat_transpose_print_some_test(): Normal end of execution. r8vec_print_test(): Python version: 3.6.9 r8vec_print() prints an R8VEC. Here is an R8VEC: 0: 123.456 1: 5e-06 2: -1e+06 3: 3.14159 r8vec_print_test(): Normal end of execution. circle_monte_carlo_test(): Normal end of execution. Tue Oct 19 11:25:28 2021