5 lines
191 B
Text
5 lines
191 B
Text
fibAnalytic : Nat -> Double
|
|
fibAnalytic n =
|
|
floor $ ((pow goldenRatio n) - (pow (-1.0/goldenRatio) n)) / sqrt(5)
|
|
where goldenRatio : Double
|
|
goldenRatio = (1.0 + sqrt(5)) / 2.0
|