Not the shortest, but how do you like this? It prints the whole sequence upt to the first number needing an exponent.
perl -e '$_||="0$/1";s;(.+)$/(.+)$;"$1$/$2$/".($1+$2);ge while!/e/;pri +nt'
BTW: What's "say"? My perdoc doesn't tell me anything about it.
In reply to Re: Fibonacci golf with one state variable
by Skeeve
in thread Fibonacci golf with one state variable
by aufflick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |