Tue May 20 21:40:04 2025 hyperball_monte_carlo_test(): python version: 3.10.12 numpy version: 1.26.4 Test hyperball_monte_carlo(). hyperball_monte_carlo_test01(): Use the Monte Carlo method to estimate integrals over the interior of the unit hyperball in M dimensions. Spatial dimension M = 3 N 1 X^2 Y^2 Z^2 X^4 X^2Y^2 Z^4 1 4.18879 0.0563604 0.278569 0.532536 0.000758331 0.00374816 0.0677033 2 4.18879 0.53562 1.25304 0.301021 0.090812 0.213771 0.0244695 4 4.18879 0.650257 0.758444 1.49946 0.160577 0.185767 0.78192 8 4.18879 0.843303 0.697929 1.53707 0.294858 0.0556624 0.662442 16 4.18879 0.839269 1.03473 0.94941 0.31502 0.164191 0.496606 32 4.18879 0.746081 0.745323 0.823654 0.295656 0.104312 0.325284 64 4.18879 0.816827 0.77438 0.844607 0.318448 0.101921 0.342806 128 4.18879 0.726898 0.805034 0.88817 0.294784 0.104403 0.392469 256 4.18879 0.832058 0.789715 0.818458 0.332267 0.1245 0.346584 512 4.18879 0.897602 0.852175 0.788647 0.393592 0.127391 0.326863 1024 4.18879 0.828106 0.850157 0.819102 0.348101 0.118075 0.345544 2048 4.18879 0.860813 0.818041 0.824118 0.375364 0.120754 0.349926 4096 4.18879 0.845102 0.832923 0.83986 0.359691 0.120225 0.357365 8192 4.18879 0.831449 0.85407 0.839388 0.355554 0.121008 0.359014 16384 4.18879 0.846118 0.84788 0.838672 0.365588 0.122936 0.358152 32768 4.18879 0.842108 0.840653 0.831593 0.362501 0.120523 0.354662 65536 4.18879 0.839368 0.84232 0.833075 0.359924 0.120119 0.356209 Exact 4.18879 0.837758 0.837758 0.837758 0.359039 0.11968 0.359039 hyperball_monte_carlo_test02(): Use the Monte Carlo method to estimate integrals over the interior of the unit hyperball in M dimensions. Spatial dimension M = 6 N 1 U V^2 V^2W^2 X^4 Y^2Z^2 Z^6 1 5.16771 2.24934 0.0796987 0.0106725 0.0914602 0.00292499 3.04241e-06 2 5.16771 1.3013 0.0953243 0.0208999 0.153763 0.00639783 0.0106937 4 5.16771 -1.00273 0.464727 0.0287847 0.00961948 0.00209077 0.0846197 8 5.16771 0.298306 1.33951 0.0542328 0.068214 0.00231999 0.360079 16 5.16771 0.259635 1.05105 0.063199 0.18014 0.00164989 0.031072 32 5.16771 0.0817953 0.690484 0.044032 0.148003 0.00454042 0.0764342 64 5.16771 -0.132818 0.615976 0.0559194 0.219044 0.00328838 0.136884 128 5.16771 -0.0612021 0.666929 0.0720365 0.239014 0.00758269 0.0629012 256 5.16771 0.240314 0.688021 0.0615327 0.17445 0.00413769 0.0894633 512 5.16771 -0.00974165 0.609346 0.0612617 0.206687 0.00614522 0.104976 1024 5.16771 -0.110884 0.657696 0.0641859 0.179152 0.00578693 0.0745845 2048 5.16771 0.0479085 0.625384 0.0597077 0.212614 0.00551361 0.0752551 4096 5.16771 -0.00721777 0.655689 0.0633575 0.193345 0.00542407 0.0810928 8192 5.16771 0.00179038 0.643221 0.0652619 0.191991 0.00551145 0.0840858 16384 5.16771 -0.00803147 0.641951 0.063782 0.190125 0.00558371 0.0832407 32768 5.16771 0.00745592 0.636013 0.063815 0.196632 0.00537877 0.0827552 65536 5.16771 0.00425001 0.650492 0.0645182 0.191251 0.00539983 0.0804361 Exact 5.16771 0 0.645964 0.0645964 0.193789 0.00538303 0.0807455 hyperball01_monomial_integral_test(): hyperball01_monomial_integral() computes the integral of a monomial over the interior of the unit hyperball in M dimensions. Compare with a Monte Carlo estimate. Spatial dimension M = 3 Number of sample points used is 4192 If any exponent is odd, the integral is zero. We will restrict this test to randomly chosen even exponents. Ex Ey Ez MC-Estimate Exact Error 2 4 4 0.000799279 0.000836921 3.8e-05 8 6 6 7.95277e-07 9.388e-07 1.4e-07 2 4 2 0.00349684 0.00362666 0.00013 6 2 0 0.0178203 0.0181333 0.00031 2 2 6 0.00137714 0.00139487 1.8e-05 2 4 2 0.00349684 0.00362666 0.00013 0 2 0 0.842437 0.837758 0.0047 2 6 0 0.0182084 0.0181333 7.5e-05 8 2 4 0.000104244 0.000114872 1.1e-05 4 2 2 0.00340697 0.00362666 0.00022 6 4 4 4.39702e-05 4.92307e-05 5.3e-06 8 6 6 7.95277e-07 9.388e-07 1.4e-07 0 8 6 0.000531934 0.000574358 4.2e-05 6 4 2 0.000258178 0.000278974 2.1e-05 0 4 2 0.038929 0.0398932 0.00096 2 4 4 0.000799279 0.000836921 3.8e-05 4 8 4 1.69902e-05 1.81376e-05 1.1e-06 0 2 4 0.0383918 0.0398932 0.0015 6 6 8 8.56768e-07 9.388e-07 8.2e-08 6 8 8 2.387e-07 2.62864e-07 2.4e-08 hyperball01_sample_test(): hyperball01_sample() samples the unit hyperball. Sample points in the unit hyperball. Row: 0 1 2 Col 0 : 0.243875 -0.640412 -0.518159 1 : -0.85354 0.373214 0.250197 2 : 0.273226 -0.292125 -0.245322 3 : 0.047936 0.399361 0.446852 4 : -0.655255 0.151879 -0.126493 5 : -0.364762 0.39659 -0.06704 6 : -0.551508 0.668772 -0.243863 7 : 0.780685 0.464154 0.22597 8 : -0.0630842 0.652396 0.205804 9 : 0.368965 0.302616 -0.804044 hyperball01_volume_test(): hyperball01_volume() returns the volume of the unit hyperball in M dimensions. M Volume 1 2 2 3.14159 3 4.18879 4 4.9348 5 5.26379 6 5.16771 7 4.72477 8 4.05871 9 3.29851 10 2.55016 hyperball_monte_carlo_test(): Normal end of execution. Tue May 20 21:40:07 2025