Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Golf -- compute PIby jsprat (Curate) |
on Apr 16, 2002 at 01:55 UTC ( [id://159388]=note: print w/replies, xml ) | Need Help?? |
How about this (72 strokes - about par for the course ;-)
for($i;$i<100000;$i+=2){$_.="+4/(($i*2)+1)-4/((($i+1)*2)+1)"};print eval
I'm assuming the algorithm can't be changed.
In Section
Meditations
|
|