4 ms·
My take on computing Fibonacci numbers using Binet’s formula: http://bosker.wordpress.com/2011/07/27/computing-fibonacci-numbers-using-binet’s-formula/ http://b
by robinhouston 15y ago
My take on computing Fibonacci numbers using Binet’s formula: http://bosker.wordpress.com/2011/07/27/computing-fibonacci-numbers-using-binet’s-formula/ http://bosker.wordpress.com/2011/07/27/computing-fibonacci-n...
The short version: it's harder than people often think to do reliably (because you need arbitrary-precision floating-point operations); and, when you do, it turns out to be slower than integer methods.