Wed Oct 8 07:30:28 2025 cube_monte_carlo_test(): python version: 3.10.12 numpy version: 1.26.4 Test cube_monte_carlo(). cube01_monomial_integral_test(): cube01_monomial_integral() computes the integral of a monomial within the interior of the unit cube in 3D. Compare with a Monte Carlo estimate. Number of sample points used is 4192 Ex Ey Ez MC-Estimate Exact Error 7 6 6 0.00211429 0.00255102 0.00044 3 7 3 0.00707444 0.0078125 0.00074 4 5 2 0.0103363 0.0111111 0.00077 7 5 6 0.00251144 0.00297619 0.00046 7 0 2 0.0415394 0.0416667 0.00013 3 3 1 0.0302468 0.03125 0.001 6 4 3 0.00651443 0.00714286 0.00063 3 5 6 0.00532329 0.00595238 0.00063 4 7 1 0.0119035 0.0125 0.0006 6 3 4 0.0065109 0.00714286 0.00063 3 6 6 0.00449987 0.00510204 0.0006 0 6 7 0.0183582 0.0178571 0.0005 5 0 7 0.0203429 0.0208333 0.00049 2 0 4 0.0659706 0.0666667 0.0007 3 4 0 0.0498354 0.05 0.00016 4 6 1 0.0136351 0.0142857 0.00065 4 5 3 0.00759349 0.00833333 0.00074 3 3 6 0.00824074 0.00892857 0.00069 0 0 6 0.14298 0.142857 0.00012 3 0 6 0.0351726 0.0357143 0.00054 cube01_monte_carlo_test() cube01_sample() estimates integrals along the interior of the unit cube in 3D. N 1 X Y Z X^2 XY XZ Y^2 YZ Z^2 1 1 0.533551 0.300982 0.149015 0.284677 0.160589 0.079507 0.0905903 0.0448508 0.0222054 2 1 0.615219 0.527162 0.802954 0.39516 0.354444 0.48189 0.332353 0.40141 0.653524 4 1 0.552213 0.457027 0.540579 0.401596 0.310065 0.24755 0.310821 0.275801 0.391473 8 1 0.478156 0.509565 0.521549 0.27746 0.272231 0.268189 0.422357 0.270471 0.330323 16 1 0.48624 0.446622 0.518326 0.303409 0.198029 0.256525 0.25838 0.237237 0.357283 32 1 0.518911 0.458242 0.439083 0.361345 0.225668 0.238115 0.322325 0.215279 0.282842 64 1 0.471909 0.464346 0.477102 0.312946 0.22772 0.231184 0.30517 0.228985 0.309201 128 1 0.502727 0.502003 0.505791 0.344577 0.246252 0.25492 0.335829 0.262027 0.332752 256 1 0.52674 0.495891 0.492491 0.36203 0.267933 0.252139 0.331895 0.246778 0.326405 512 1 0.504872 0.495779 0.487207 0.340135 0.245224 0.247013 0.327164 0.235837 0.317675 1024 1 0.518615 0.51433 0.492392 0.353324 0.267542 0.250242 0.346794 0.253455 0.324018 2048 1 0.494052 0.497217 0.499916 0.328427 0.245289 0.245374 0.328028 0.248223 0.335919 4096 1 0.498727 0.498225 0.509705 0.331721 0.249051 0.255758 0.330843 0.255678 0.342725 8192 1 0.494903 0.498658 0.496927 0.328501 0.246579 0.245142 0.332096 0.248613 0.330482 16384 1 0.498006 0.494351 0.501458 0.332285 0.245577 0.248734 0.327812 0.247318 0.335525 32768 1 0.499723 0.499184 0.500765 0.333398 0.24929 0.250456 0.331978 0.249403 0.334406 65536 1 0.503511 0.499942 0.498859 0.336942 0.251314 0.250909 0.33338 0.24914 0.332191 Exact 1 0.5 0.5 0.5 0.333333 0.25 0.25 0.333333 0.25 0.333333 cube01_sample_test(): cube01_sample() samples the unit cube. Sample points in the unit cube. Row: 0 1 2 Col 0 : 0.556599 0.615328 0.943913 1 : 0.068661 0.340616 0.347896 2 : 0.533511 0.294878 0.140921 3 : 0.14331 0.294263 0.600921 4 : 0.856781 0.84587 0.942453 5 : 0.184198 0.729322 0.916254 6 : 0.133499 0.112206 0.918237 7 : 0.142317 0.199879 0.912811 8 : 0.785916 0.271752 0.67931 9 : 0.755503 0.731401 0.98086 cube01_volume_test(): Python version: 3.10.12 cube01_volume() returns the volume of the unit cube. Volume = 1 cube_monte_carlo_test(): Normal end of execution. Wed Oct 8 07:30:29 2025