Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
20
Task/Pi/FunL/pi.funl
Normal file
20
Task/Pi/FunL/pi.funl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
def compute_pi =
|
||||
def g( q, r, t, k, n, l ) =
|
||||
if 4*q + r - t < n*t
|
||||
n # g( 10*q, 10*(r - n*t), t, k, (10*(3*q + r))\t - 10*n, l )
|
||||
else
|
||||
g( q*k, (2*q + r)*l, t*l, k + 1, (q*(7*k + 2) + r*l)\(t*l), l + 2 )
|
||||
|
||||
g( 1, 0, 1, 1, 3, 3 )
|
||||
|
||||
if _name_ == '-main-'
|
||||
print( compute_pi().head() + '.' )
|
||||
|
||||
if args.isEmpty()
|
||||
for d <- compute_pi().tail()
|
||||
print( d )
|
||||
else
|
||||
for d <- compute_pi().tail().take( int(args(0)) )
|
||||
print( d )
|
||||
|
||||
println()
|
||||
Loading…
Add table
Add a link
Reference in a new issue