Skip to content

Instantly share code, notes, and snippets.

@peterc
Created June 10, 2011 22:34
Show Gist options
  • Save peterc/1019922 to your computer and use it in GitHub Desktop.
Save peterc/1019922 to your computer and use it in GitHub Desktop.
fib=->(n){_=5**0.5;(((1+_)**n-(1-_)**n)/(2**n*_)).to_i}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment