Hacker GitHub

← All repos

xyzzyz/FibBinet

View on GitHub ↗ ★ 6 Haskell

Compute Fbonacci numbers using Binet's formula

5 mentions on Hacker News by 1 person: 0 stories, 5 comments · first 2012-04-28 · latest 2024-10-29

Mentions per year 5 mentions · busiest year 2012 (1)
20082026
  1. You totally can. Here is a O(log n) implementation of the Binet formula with infinite precision: https://github.com/xyzzyz/FibBinet/blob/master/FibBinet.hs
  2. I implemented the same in Haskell a while ago: https://github.com/xyzzyz/FibBinet/blob/master/FibBinet.hs With yours, both make interesting comparison of how similar problem is solved in different languages.
  3. …represent elements using two rational numbers, obtaining exact results. See example implementation: https://github.com/xyzzyz/FibBinet
    comment by xyzzyz · 2015-04-03 · in Fast Fibonacci
  4. …the analytical formula for our special number system. I've implemented it a while ago in Haskell: https://github.com/xyzzyz/FibBinet
    comment by xyzzyz · 2013-01-28 · in On calculating Fibonacci numbers in C
  5. Binet formula needs not to be implemented using floating point numbers: https://github.com/xyzzyz/FibBinet