Shell function to calculate the ratio of neighboring Fibonacci numbers (φ) with recursion without exponential blow-up:
fibratio ()
{
echo "define f(n){auto a,b,t,i;a=0;b=1;for(i=2;i<=n;i++){t=a+b;a=b;b=t};if(n==0)return 0;return b};for(i=2;i<=$1;i++) print f(i)/f(i-1),\"\n\"" | bc -l
}
