HNHacker News
TopNewBestAskShowJobs

nealwu

8 karma · joined October 9, 2012

twitter.com/WuNeal
submissionscomments
nealwu··on Bitcoin, Bitcoin cash, ethereum and litecoin crash on Friday December 22
This person is trolling all of you. Look at this post he/she made nearly four years ago: https://news.ycombinator.com/item?id=7803526
nealwu··on The Nth Fibonacci Number in O(log N)
As mentioned, the actual number has O(N) bits and thus can't actually be computed in O(log N) time. So if you just want an approximation, you may as well use Binet's formula. [1]

However, one thing this algorithm can do that Binet's formula can't is compute the N-th Fibonacci number modulo some constant M in O(log N) time. So you could very efficiently compute, say, the last 12 digits of F_123456789. A lot of programming contests (TopCoder, Google Code Jam, etc.) will ask for the answer modulo some constant to take advantage of this trick.

[1] http://en.wikipedia.org/wiki/Fibonacci_number#Closed-form_ex...