Wed Oct 8 07:53:37 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.668585 0.00037592 2.3192 0.106715 6.00018e-05 1.28407 2 4.18879 1.09938 1.29538 1.62828 0.424944 0.394425 0.977107 4 4.18879 0.240729 1.68604 1.48532 0.0318995 0.0780572 0.846673 8 4.18879 0.720104 0.577183 1.29471 0.224475 0.0635938 0.69631 16 4.18879 0.865319 1.13034 0.96033 0.407508 0.14452 0.495601 32 4.18879 0.59552 1.15394 0.981252 0.282433 0.120816 0.447212 64 4.18879 0.670573 0.792908 0.865838 0.234649 0.105149 0.383912 128 4.18879 0.834264 0.76642 0.888168 0.353196 0.112422 0.410968 256 4.18879 0.858729 0.788089 0.947476 0.378075 0.113442 0.447373 512 4.18879 0.884878 0.84637 0.818657 0.38198 0.130605 0.335417 1024 4.18879 0.831671 0.809078 0.855116 0.356287 0.116697 0.367263 2048 4.18879 0.872412 0.85479 0.831445 0.382274 0.126093 0.355481 4096 4.18879 0.838201 0.837533 0.862314 0.354769 0.120542 0.367705 8192 4.18879 0.833639 0.836463 0.833342 0.358542 0.118897 0.357701 16384 4.18879 0.834523 0.830867 0.841171 0.358804 0.118173 0.358236 32768 4.18879 0.841428 0.843519 0.82078 0.359826 0.121193 0.347525 65536 4.18879 0.838955 0.838946 0.842325 0.359936 0.120502 0.361922 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 0.630704 0.830037 0.110314 0.997116 1.20645e-05 0.00403863 2 5.16771 1.848 0.0566343 0.0101747 0.13707 0.0111626 0.000952663 4 5.16771 -0.543369 0.579986 0.080494 0.385168 0.000714272 0.251006 8 5.16771 0.582963 0.532086 0.102398 0.0986098 0.00219936 0.00260404 16 5.16771 0.396516 0.942703 0.0706692 0.173616 0.00448365 0.0268796 32 5.16771 -0.112528 0.569638 0.0905035 0.119094 0.00764578 0.067513 64 5.16771 0.0827139 0.780074 0.0574539 0.185058 0.00285361 0.0458501 128 5.16771 0.0182101 0.645614 0.0697524 0.212128 0.00410989 0.0995141 256 5.16771 -0.0791877 0.662384 0.0595257 0.171754 0.00611177 0.0747114 512 5.16771 -0.0872574 0.638415 0.0673184 0.158987 0.00602768 0.101116 1024 5.16771 -0.0447274 0.67368 0.0683148 0.183194 0.00488089 0.0752913 2048 5.16771 0.0237527 0.626176 0.063623 0.213232 0.00536231 0.081166 4096 5.16771 0.00636548 0.652706 0.0664559 0.194607 0.0046948 0.0777976 8192 5.16771 0.0263069 0.649923 0.0646656 0.194202 0.00558615 0.0800974 16384 5.16771 0.00139595 0.652481 0.0640589 0.197084 0.00547246 0.0826176 32768 5.16771 0.00059832 0.647738 0.0660364 0.193702 0.00545953 0.0785531 65536 5.16771 -1.11653e-05 0.647784 0.0639127 0.194201 0.00540169 0.0819258 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 4 4 4 0.000168734 0.000167384 1.3e-06 0 4 8 0.00190087 0.00195282 5.2e-05 6 0 2 0.0186835 0.0181333 0.00055 4 4 0 0.0110633 0.01088 0.00018 2 6 8 2.92184e-05 3.02293e-05 1e-06 0 2 2 0.117601 0.11968 0.0021 6 0 6 0.00146451 0.00139487 7e-05 6 8 8 2.53136e-07 2.62864e-07 9.7e-09 6 8 2 3.07415e-05 3.02293e-05 5.1e-07 0 4 8 0.00190087 0.00195282 5.2e-05 8 4 4 1.94023e-05 1.81376e-05 1.3e-06 2 0 4 0.040576 0.0398932 0.00068 0 8 2 0.00937771 0.00976408 0.00039 6 0 8 0.000599943 0.000574358 2.6e-05 0 2 6 0.0176684 0.0181333 0.00046 8 2 2 0.000689718 0.000650939 3.9e-05 4 0 8 0.0019913 0.00195282 3.8e-05 2 2 8 0.000646457 0.000650939 4.5e-06 8 4 0 0.0019832 0.00195282 3e-05 4 8 8 1.24633e-06 1.31432e-06 6.8e-08 hyperball01_sample_test(): hyperball01_sample() samples the unit hyperball. Sample points in the unit hyperball. Row: 0 1 2 Col 0 : 0.0977207 0.567308 0.2946 1 : 0.103255 0.894065 -0.340254 2 : 0.466263 0.675009 -0.274094 3 : -0.151425 0.285493 -0.0703035 4 : -0.199595 -0.105151 0.480479 5 : 0.812439 -0.00916139 0.0342456 6 : -0.235271 0.393779 0.114386 7 : 0.452606 -0.318309 -0.664358 8 : -0.698544 0.411905 -0.46162 9 : -0.253062 -0.0912752 -0.0423406 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. Wed Oct 8 07:53:39 2025