and:1while($x||=3)-($x-=sin$x/cos$x);print"$x\n"
1while($x||=2)-($x-=((log($x)-1)*$x));print"$x\n"
I particularly like the fact that it only uses 1 variable ;-)
Liz
Update:
Golfed some more by losing the seperate initial assignement of $x
In reply to Re: Deriving pi and e
by liz
in thread Deriving pi and e
by fredopalus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |