First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
This commit is contained in:
commit
1e05ecd7ee
781 changed files with 9080 additions and 0 deletions
5
Task/Pi/Haskell/pi.hs
Normal file
5
Task/Pi/Haskell/pi.hs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
pi_ = g(1,0,1,1,3,3) where
|
||||
g (q,r,t,k,n,l) =
|
||||
if 4*q+r-t < n*t
|
||||
then n : g (10*q, 10*(r-n*t), t, k, div (10*(3*q+r)) t - 10*n, l)
|
||||
else g (q*k, (2*q+r)*l, t*l, k+1, div (q*(7*k+2)+r*l) (t*l), l+2)
|
||||
Loading…
Add table
Add a link
Reference in a new issue