Tue May 20 21:22:09 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 0 6 1 0.070752 0.0714286 0.00068 0 1 5 0.0871601 0.0833333 0.0038 2 0 3 0.083347 0.0833333 1.4e-05 0 0 7 0.129347 0.125 0.0043 6 7 4 0.0033815 0.00357143 0.00019 6 2 5 0.00799733 0.00793651 6.1e-05 6 5 0 0.022692 0.0238095 0.0011 0 1 0 0.496774 0.5 0.0032 0 2 6 0.0505642 0.047619 0.0029 1 2 3 0.0419026 0.0416667 0.00024 7 3 2 0.0100274 0.0104167 0.00039 2 1 3 0.04157 0.0416667 9.7e-05 7 6 7 0.00225213 0.00223214 2e-05 5 3 2 0.0132831 0.0138889 0.00061 4 6 3 0.00675613 0.00714286 0.00039 5 2 2 0.017883 0.0185185 0.00064 3 4 1 0.0236263 0.025 0.0014 7 6 0 0.0169577 0.0178571 0.0009 3 2 3 0.0204571 0.0208333 0.00038 0 0 2 0.336923 0.333333 0.0036 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.610183 0.684841 0.0442527 0.372323 0.417878 0.0270022 0.469007 0.030306 0.0019583 2 1 0.488106 0.618556 0.703406 0.251242 0.275816 0.33399 0.435055 0.453874 0.501504 4 1 0.440135 0.435287 0.437677 0.237752 0.245385 0.210038 0.287533 0.172239 0.305259 8 1 0.496592 0.484795 0.43821 0.370406 0.21955 0.157726 0.33407 0.224678 0.273801 16 1 0.536623 0.403988 0.598585 0.364054 0.206107 0.350196 0.2312 0.272327 0.464351 32 1 0.535676 0.495589 0.566825 0.379205 0.248538 0.296404 0.324793 0.286496 0.394466 64 1 0.486433 0.550017 0.533696 0.325827 0.277213 0.245338 0.367031 0.285673 0.382303 128 1 0.534079 0.475883 0.505 0.369158 0.239088 0.26683 0.314034 0.248199 0.344005 256 1 0.493251 0.478988 0.49606 0.323082 0.23071 0.251706 0.312041 0.232629 0.331684 512 1 0.507615 0.506541 0.496055 0.343665 0.261573 0.248381 0.341499 0.254111 0.331111 1024 1 0.49757 0.505975 0.502299 0.334488 0.251622 0.251442 0.339216 0.255913 0.333434 2048 1 0.504794 0.504768 0.484285 0.335834 0.252636 0.246629 0.337134 0.244148 0.319295 4096 1 0.497847 0.492927 0.493744 0.332177 0.245806 0.24393 0.326984 0.24333 0.328344 8192 1 0.493217 0.503668 0.500037 0.327313 0.248154 0.24627 0.337007 0.251136 0.333444 16384 1 0.49827 0.499316 0.497467 0.33129 0.249375 0.248663 0.332342 0.249057 0.330491 32768 1 0.499162 0.500806 0.497271 0.332158 0.250049 0.247763 0.333446 0.249411 0.331044 65536 1 0.501885 0.49977 0.500722 0.335379 0.250294 0.25155 0.333318 0.24988 0.33375 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.270036 0.924818 0.907688 1 : 0.56079 0.485661 0.273185 2 : 0.39325 0.266405 0.986001 3 : 0.734496 0.439498 0.85387 4 : 0.866876 0.34403 0.425762 5 : 0.884144 0.869007 0.811206 6 : 0.227049 0.496844 0.0914304 7 : 0.119055 0.146892 0.534848 8 : 0.327453 0.407449 0.988587 9 : 0.738566 0.184283 0.658002 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. Tue May 20 21:22:10 2025