Created
May 21, 2014 22:02
-
-
Save wescleymatos/f2c737d402c19bd7f30b to your computer and use it in GitHub Desktop.
Caucular Fibinacci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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