Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,11 @@
func nthroot(n, a, precision=1e-5) {
var x = 1;
var prev = 0;
while ((prev-x).abs > precision) {
prev = x;
x = (((n-1)*prev + a/(prev**(n-1))) / n);
};
return x;
}
say nthroot(5, 34); # => 2.024397458501034082599817835297912829678