News for hackers. Stuff that matters.
Re:A Linear Algebra Trick for Computing Fibonacci Numbers Fast by kmill on Monday November 06, 2023 @03:31PM (#38168549)
Yes, I believe so, up to some multiplication factor.

You can carry out the exponentiations in the field Q[sqrt(5)], which is two-dimentional over Q. The interesting thing here is that diagonalization is trading one 2d vector space for another -- one with a very well-behaved multiplication operation (it's distributive, commutative, associative, and invertible).

There's no need to do this to quickly compute fibonacci numbers, but it's pretty neat.

There are no comments on this comment yet.