in reply to Re: Golf -- compute PI
in thread Golf -- compute PI

Shave another
$i+=($_%2*8-4)/($_*2-1)for 1..1e6;print$i
or equivalently
$i+=4*(-1)**$_/(1-$_*2)for 1..1e6;print$i