3 <script src=
"../htmlrunner.js"></script>
5 // The Computer Language Shootout
6 // http://shootout.alioth.debian.org/
7 // contributed by Isaac Gouy
10 if (m
==0) { return n
+1; }
11 if (n
==0) { return ack(m
-1,1); }
12 return ack(m
-1, ack(m
,n
-1) );
16 if (n
< 2){ return 1; }
17 return fib(n
-2) + fib(n
-1);
22 return tak(tak(x
-1,y
,z
), tak(y
-1,z
,x
), tak(z
-1,x
,y
));
25 window
.onload = function(){ startTest("sunspider-controlflow-recursive", '558ed308');
27 test("Ack", function(){
28 for ( var i
= 3; i
<= 5; i
++ )
32 test("Fib", function(){
33 for ( var i
= 3; i
<= 5; i
++ )
37 test("Tak", function(){
38 for ( var i
= 3; i
<= 5; i
++ )