Wed Oct 8 07:56:47 2025 hypersphere_monte_carlo_test(): python version: 3.10.12 numpy version: 1.26.4 Test hypersphere_monte_carlo(). hypersphere01_area_test Python version: 3.10.12 hypersphere01_area returns the area of the unit hypersphere. M Area 1 2 2 6.28319 3 12.5664 4 19.7392 5 26.3189 6 31.0063 7 33.0734 8 32.4697 9 29.6866 10 25.5016 hypersphere01_monomial_integral_test(): hypersphere01_monomial_integral() returns the integral of a monomial over the surface of the unit hypersphere in 3D. Compare with a Monte Carlo estimate. 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 6 0.00428654 0.00418461 0.0001 8 6 8 6.81058e-06 6.5716e-06 2.4e-07 4 6 8 9.36335e-05 9.0688e-05 2.9e-06 8 0 6 0.0105976 0.00976408 0.00083 6 0 2 0.211092 0.199466 0.012 6 2 4 0.00433883 0.00418461 0.00015 6 0 2 0.211092 0.199466 0.012 8 2 6 0.000604237 0.000574358 3e-05 4 8 6 9.0574e-05 9.0688e-05 1.1e-07 6 0 0 1.80795 1.7952 0.013 2 0 0 4.21553 4.18879 0.027 4 2 0 0.346754 0.359039 0.012 0 4 0 2.4158 2.51327 0.097 0 2 0 4.06284 4.18879 0.13 6 8 4 8.88802e-05 9.0688e-05 1.8e-06 0 6 8 0.00985465 0.00976408 9.1e-05 2 6 8 0.000586187 0.000574358 1.2e-05 4 2 6 0.00433791 0.00418461 0.00015 4 0 6 0.0571165 0.0543999 0.0027 4 8 8 3.07466e-05 3.02293e-05 5.2e-07 hypersphere01_monte_carlo_test01(): hypersphere01_sample() estimates integrals over the surface of the unit hypersphere in M dimensions. Spatial dimension M = 3 N 1 X^2 Y^2 Z^2 X^4 X^2Y^2 Z^4 1 12.566371 0.315063 10.208525 2.042783 0.007899 0.255948 0.332074 2 12.566371 4.141395 4.373281 4.051695 2.720393 0.596833 1.499080 4 12.566371 4.645469 3.917743 4.003159 3.288139 0.375461 1.954387 8 12.566371 7.300154 4.096403 1.169814 5.046315 1.657351 0.232892 16 12.566371 3.253646 4.105520 5.207205 1.515138 0.969026 3.576235 32 12.566371 4.387450 3.973555 4.205366 2.637471 0.982412 2.654609 64 12.566371 3.520776 5.133946 3.911649 1.953372 0.862484 2.432063 128 12.566371 4.045337 4.875074 3.645959 2.213273 0.993837 1.924254 256 12.566371 3.926342 4.062925 4.577103 2.286693 0.812877 2.871639 512 12.566371 4.382725 4.192094 3.991552 2.673589 0.861884 2.360862 1024 12.566371 4.140095 4.282339 4.143937 2.438509 0.834246 2.439478 2048 12.566371 4.151858 4.117008 4.297505 2.491364 0.809488 2.602652 4096 12.566371 4.214869 4.020072 4.331430 2.543935 0.809065 2.619451 8192 12.566371 4.298732 4.203150 4.064489 2.608200 0.857491 2.404289 16384 12.566371 4.240144 4.145236 4.180990 2.563812 0.829033 2.492302 32768 12.566371 4.174671 4.228827 4.162873 2.500915 0.845559 2.497538 65536 12.566371 4.186182 4.202690 4.177498 2.511605 0.838801 2.505835 Exact 12.566371 4.188790 4.188790 4.188790 2.513274 0.837758 2.513274 hypersphere01_monte_carlo_test02(): hypersphere01_sample() estimates integrals over the surface of the unit hypersphere in M dimensions. Spatial dimension M = 6 N 1 U V^2 V^2W^2 X^4 Y^2Z^2 Z^6 1 31.006277 -1.159861 14.488331 2.607875 2.127910 0.000009 0.000000 2 31.006277 -14.105692 2.637104 0.439204 0.156071 0.135087 3.890445 4 31.006277 -3.494847 4.153538 0.462005 4.072592 0.027974 1.205575 8 31.006277 3.984580 3.633812 0.194065 3.140356 0.050317 0.018809 16 31.006277 0.089931 5.481213 1.019774 1.583241 0.033574 1.631603 32 31.006277 -1.067304 2.788254 0.459726 2.724126 0.050680 0.600335 64 31.006277 2.023677 5.722232 0.899340 1.470265 0.054866 1.212206 128 31.006277 1.016726 5.337133 0.664520 1.808194 0.077222 1.057468 256 31.006277 0.770552 5.428407 0.660138 1.813541 0.070592 0.858292 512 31.006277 -0.140885 4.738278 0.594453 1.998824 0.065740 1.010367 1024 31.006277 -0.183429 4.988425 0.639544 2.005271 0.068767 0.921182 2048 31.006277 -0.024294 4.927835 0.638578 1.893713 0.064347 1.027699 4096 31.006277 -0.095006 5.135630 0.655036 2.068358 0.062135 0.923595 8192 31.006277 -0.199634 5.223910 0.658702 1.907393 0.066690 0.983613 16384 31.006277 0.205302 5.208865 0.635406 1.975045 0.063754 0.958864 32768 31.006277 0.047202 5.165441 0.644884 1.914829 0.064816 0.978015 65536 31.006277 0.047724 5.178201 0.645206 1.911059 0.063935 0.971699 Exact 31.006277 0.000000 5.167713 0.645964 1.937892 0.064596 0.968946 hypersphere01_sample_test() hypersphere01_sample() samples the unit hypersphere in M dimensions. Sample points on the unit hypersphere. Row: 0 1 2 Col 0 : -0.904124 0.418577 -0.0857552 1 : -0.00240305 0.110006 0.993928 2 : 0.0128645 0.895578 -0.444718 3 : 0.250404 0.916262 -0.312669 4 : -0.405639 0.907812 -0.106465 5 : -0.497702 -0.68703 0.529417 6 : 0.0532967 0.0118538 0.998508 7 : 0.790564 -0.470255 -0.392261 8 : -0.695304 -0.0756154 -0.714727 9 : -0.141436 0.620597 0.771269 hypersphere_monte_carlo_test(): Normal end of execution. Wed Oct 8 07:56:49 2025