Sunday, January 4, 2009

the 300,000th Fibonacci number

I am doing some studying of computational finanacial mathematics. Part of this involves numerical approximation and performance of algorithms.

During this quest I have stumbled upon 2 ways to very rapidly compute the Subject: number.
I guess I could not have imagined what this number might be.

Now as a result of Mma, I can see this number. In scientific notation, it is:

8.761732532916364 E 62695

The first computation is the standard recursive definition. On my machine, this takes 1.422 seconds.

The second computation involves nested powers of a simple 2x2 matrix with 2 column vectors equal to {0,1} and {1,1}. If this matrix is multipled by itself 300,000 times, the 2,2 element contains the number above. On my machine Mma takes 0. !?! seconds to perform this.

Currently I do not know how to make Matlab compute this number. It just gives Inf (=Infinity?!).

A transcipt log is stored here.

Regards..
----------------------------
Originally posted 7/13/2007 at http://www.congruentialuminaire.com/cLBlog

No comments:

Post a Comment