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

1-d sphere

The sphere in 1 dimension is just the line segment that runs from -1 to 1. It`s volume (1-dimensional integral) is just 2. In this case, the Monte-Carlo method will be exact (even with ONE point!) because in this case, the unit sphere is exactly the same as the ''box`` with side 2. Here is the uninteresting output from my program:

--------------------------------------------- 
VALUES AVERAGED OVER ALL PROCESSORS: 
 volume of 1 sphere is    2.0000000000000000e+00 
 st. dev. is    0.0000000000000000e+00 
 total number of points: 4000 
---------------------------------------------



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