Wed Oct 8 08:24:54 2025 line_monte_carlo_test(): python version: 3.10.12 numpy version: 1.26.4 Test line_monte_carlo(). line01_length_test Python version: 3.10.12 line01_length returns the length of the unit line. line01_length() = 1 line01_monomial_integral_test(): line01_monomial_integral() computes integrals of monomials along the length of the unit line in 1D. Compare with a Monte Carlo estimate. Number of sample points used is 4192 E MC-Estimate Exact Error 0 1 1 0 1 0.499578 0.5 0.00042 2 0.334083 0.333333 0.00075 3 0.251608 0.25 0.0016 4 0.202065 0.2 0.0021 5 0.168942 0.166667 0.0023 6 0.145208 0.142857 0.0024 7 0.127355 0.125 0.0024 8 0.113437 0.111111 0.0023 9 0.10228 0.1 0.0023 10 0.0931384 0.0909091 0.0022 line01_sample_ergodic_test line01_sample_ergodic ergodically samples the unit line segment. Use it to estimate integrals. N 1 X X^2 X^3 X^4 X^5 X^6 1 1 0 0 0 0 0 0 2 1 0.309017 0.190983 0.118034 0.072949 0.045085 0.027864 4 1 0.427051 0.291796 0.218071 0.17029 0.136355 0.111026 8 1 0.413119 0.250776 0.171023 0.124225 0.0938416 0.0728193 16 1 0.447755 0.284841 0.204531 0.157051 0.125904 0.104051 32 1 0.485777 0.321787 0.24041 0.191736 0.159343 0.136226 64 1 0.499321 0.334877 0.252444 0.202822 0.16962 0.145816 128 1 0.495158 0.328808 0.245479 0.195471 0.162142 0.138345 256 1 0.498552 0.332222 0.248946 0.198967 0.165659 0.141881 512 1 0.499481 0.333004 0.249711 0.1997 0.166339 0.142498 1024 1 0.499385 0.332791 0.249513 0.199558 0.166263 0.142487 2048 1 0.499682 0.333067 0.249768 0.199791 0.166474 0.142676 4096 1 0.500031 0.333394 0.25007 0.200071 0.166737 0.142925 8192 1 0.499998 0.333335 0.250006 0.200009 0.166678 0.142872 16384 1 0.499931 0.333268 0.249938 0.199941 0.16661 0.142803 32768 1 0.499979 0.333316 0.249984 0.199986 0.166654 0.142845 65536 1 0.5 0.333335 0.250003 0.200003 0.166669 0.14286 Exact 1 0.5 0.333333 0.25 0.2 0.166667 0.142857 line01_sample_random_test(): line01_sample_random() randomly samples the unit line segment. Use it to estimate integrals. N 1 X X^2 X^3 X^4 X^5 X^6 1 1 0.102249 0.0104549 0.001069 0.000109305 1.11763e-05 1.14277e-06 2 1 0.768027 0.591745 0.457364 0.354599 0.275759 0.215082 4 1 0.363652 0.198615 0.120461 0.074556 0.0463289 0.0288191 8 1 0.488992 0.28462 0.175659 0.111736 0.0725318 0.0478035 16 1 0.519757 0.343868 0.254598 0.200398 0.163945 0.137738 32 1 0.579102 0.43191 0.355418 0.308207 0.275985 0.252385 64 1 0.432946 0.275038 0.202721 0.160184 0.131813 0.111446 128 1 0.51454 0.35699 0.277738 0.229341 0.19625 0.17193 256 1 0.489999 0.315769 0.23038 0.181079 0.149477 0.127668 512 1 0.484468 0.320976 0.23931 0.190015 0.157022 0.133389 1024 1 0.502105 0.334905 0.250935 0.200382 0.166604 0.142442 2048 1 0.508041 0.342749 0.258858 0.207842 0.173486 0.148774 4096 1 0.507443 0.339457 0.254854 0.203871 0.169757 0.145308 8192 1 0.49759 0.331254 0.248552 0.199062 0.166097 0.142553 16384 1 0.499475 0.332234 0.248775 0.19883 0.165606 0.141916 32768 1 0.503688 0.336705 0.252812 0.202301 0.168547 0.144403 65536 1 0.50083 0.334056 0.250606 0.200532 0.167153 0.143312 Exact 1 0.5 0.333333 0.25 0.2 0.166667 0.142857 monomial_value_1d_test(): monomial_value_1d() evaluates a monomial of a 1D argument. X^(-1) X^(0) X^(1) X^(2) X^(5) 0.150721 1 6.63476 44.02 12856.6 7.52937 1 0.132813 0.0176394 4.13245e-05 -1.9029 1 -0.525515 0.276166 -0.0400797 0.114763 1 8.71362 75.9271 50233.4 0.112735 1 8.8704 78.6839 54918 line_monte_carlo_test(): Normal end of execution. Wed Oct 8 08:24:54 2025