News for hackers. Stuff that matters.
Re:A program to compute the nth Fibonacci number by sp332 on Saturday April 28, 2012 @03:30PM (#3903826)
That's probably faster, but it's not O(1). Calculating sqrt(5) to the needed precision, and raising phi to the n power, are not O(1).
Re:A program to compute the nth Fibonacci number by ranit8 on Saturday April 28, 2012 @04:29PM (#3903997)
> Calculating sqrt(5) to the needed precision...

I think this one could be optimized by precomputing and storing (1 + sqrt(5)) at the highest precision available.

Re:A program to compute the nth Fibonacci number by sp332 on Sunday April 29, 2012 @07:41AM (#3905749)
If you want to find an arbitrarily high F(n), you will need an arbitrarily high precision of sqrt(5).