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