4 lines
94 B
Text
4 lines
94 B
Text
Fib(n)={
|
|
my(F=k->my(f=self());if(k<2,k,f(k-1)+f(k-2)));
|
|
if(n<0,(-1)^(n+1),1)*F(abs(n))
|
|
};
|