in reply to Golf -- compute PI

Here's a few more methods of achieving pi:

#

map$x+=(-1)**$_*4/(2*$_+1),0..1e6;die$x

Now, I know Ovid said no Trig functions, but I couldn't resist. Perhaps we could consider the next two examples mulligans :-)

#

use Math::Trig;die 16*atan(1/5)-4*atan(1/239)

#

use Math::Trig;die pi

-Eric

#

**39**Charactersmap$x+=(-1)**$_*4/(2*$_+1),0..1e6;die$x

Now, I know Ovid said no Trig functions, but I couldn't resist. Perhaps we could consider the next two examples mulligans :-)

#

**45**Charactersuse Math::Trig;die 16*atan(1/5)-4*atan(1/239)

#

**21**Charactersuse Math::Trig;die pi

-Eric

**Update:**Taking some of PrakashK's suggestions, shaved off a few more characters. Thanks PrakashK! :-)
In Section
Meditations