Skip to content

Instantly share code, notes, and snippets.

@wescleymatos
Created May 21, 2014 22:02
Show Gist options
  • Save wescleymatos/f2c737d402c19bd7f30b to your computer and use it in GitHub Desktop.
Save wescleymatos/f2c737d402c19bd7f30b to your computer and use it in GitHub Desktop.
Caucular Fibinacci
var Binet = function( X ) {
var sqrt5 = Math.sqrt( 5 );
return ( 1 / sqrt5 ) * ( Math.pow( ( 1 + sqrt5 ) / 2 , X ) - Math.pow( ( 1 - sqrt5 ) / 2 , X ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment