Jack Andrews <[email protected]> on Sat, May 07, 2011 (22:48 +1000) wrote:
> hi,
>
> does anyone have a collection of
> formulae for pi (in j)?
>
> ta, jack.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
To calculate 8*b hexadecimal digits of pi, starting from digit a:
d=:3 :'1|+/4 _2 _1 _1*+/(y&(16^-)%1 4 5 6+8*])"0 i.y+9'
,1([:}.'0123456789abcdef'{~[:|.[:<.[:(],~16*1|{.)^:8 d)"0\a+8x*i.b
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm