Pi In The 4th Dimension
Anonymous Coward writes "Hoy! There is some crazy guy who is all set to prove that the value of the mathematical constant Pi is same for all dimensions. He has calculated Pi for the 4th dimension - and it..it's almost equal - 3.1447817532635 wheras the calculated value of Pi in 2 dimensions (circle) is 3.1416999189943. Math nerds can calculate the percentage error. The project is on SourceForge.net and they even have an online version "
i had to go through the source to figure out what they meant by pi in higher dimensions. at first i assumed it had to be something interesting, since they bothered to post it, but it's not. they're just useing simple calculations to find the volume of spheres and hyperspheres, and plugging that into the known, proven formulas to find pi.
for a circle, A=pi*r^2
for a sphere, V=4/3*pi*r^3
for a hypersphere, V=pi^2*r^4/2
by "proving" that pi is the same in multiple dimensions, they merely demonstrate these well-established identities. of course, since they're using a clumsy "brute force" method to initially calculate the volume, they're not actually proving anything, since they only get an approximate answer.
#define F(x) int main(){printf(#x,10,#x);}
F(#define F(x) int main(){printf(#x,10,#x);}%cF(%s))