next up previous
Next: Code Up: Output Previous: 2-d sphere

5-dimensional sphere

The volume of a 5-sphere is .

Here is the output for 40 data points:

--------------------------------------------- 
VALUES AVERAGED OVER ALL PROCESSORS: 
 volume of 5 sphere is    3.2000000000000002e+00 
 st. dev. is    2.5000000000000000e-01 
 total number of points: 40 
---------------------------------------------

Here is the output for 400 data points:

--------------------------------------------- 
VALUES AVERAGED OVER ALL PROCESSORS: 
 volume of 5 sphere is    5.3600000000000003e+00 
 st. dev. is    3.7290279534053250e-01 
 total number of points: 400 
---------------------------------------------

Here is the output for 4000 data points:

--------------------------------------------- 
VALUES AVERAGED OVER ALL PROCESSORS: 
 volume of 5 sphere is    5.1760000000000002e+00 
 st. dev. is    3.6815375987510152e-01 
 total number of points: 4000 
---------------------------------------------

Here is the output for 40000 data points:

--------------------------------------------- 
VALUES AVERAGED OVER ALL PROCESSORS: 
 volume of 5 sphere is    5.2711999999999994e+00 
 st. dev. is    3.7090335868295232e-01 
 total number of points: 40000 
---------------------------------------------

Here is the output for 400000 data points:

--------------------------------------------- 
VALUES AVERAGED OVER ALL PROCESSORS: 
 volume of 5 sphere is    5.2960000000000003e+00 
 st. dev. is    3.7163076719029231e-01 
 total number of points: 400000 
---------------------------------------------

Here is the output for 4000000 data points:

--------------------------------------------- 
VALUES AVERAGED OVER ALL PROCESSORS: 
 volume of 5 sphere is    5.2578799999999992e+00 
 st. dev. is    3.7055543917950218e-01 
 total number of points: 4000000 
---------------------------------------------

Again, we see quick convergence to about 0.1 far as it goes. This demonstrates that Monte Carlo methods are good with multi-dimensional integrals, PROVIDED you only need an accuracy of 1 part in 100 or 1000.



Mark Miller
Wed Nov 15 00:01:31 EST 1995