I always love implementing this (++ if you can tell where the algorithm comes from!)
This version will run (incessantly) as a one-liner as well. -zenofor($|++,$_++,$a++;;$,+=$a/$_,$_++,$a*=-1,$_++){printf"%.16f\n",$,*4}
Update: As MrNobo1024 has answered correctly, this algorithm was discovered by Gregory and Leibniz.
Back to
Obfuscated Code