aboutsummaryrefslogtreecommitdiff
path: root/comparison/Inpla/src/fib-38.in
blob: a79eb5b1b60426f8c0394cbd80be9f76ca954797 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Fibonacci number
Fib(r) >< (int n)
| n == 0 => r~0
| n == 1 => r~1
| _ => Add(r,cnt2)~cnt1, Fib(cnt1)~(n-1), Fib(cnt2)~(n-2);

/*
Addd(r,n) >< (int m)
=> Addd2(r,m) ~ n;

Addd2(r,int m) >< (int n)
=> r~(m+n);
*/

Fib(r)~38;
r;
free r;