[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fibonacci
From: |
Emil Jerabek |
Subject: |
Fibonacci |
Date: |
Tue, 3 Jul 2001 13:33:56 +0200 |
User-agent: |
Mutt/1.2.5i |
This is not a bug report, just a suggestion.
A comment in mpz/fib_ui.c says something about computing the Fibonacci
numbers using Lucas numbers, since that would enable to replace
general multiplication by squaring in the recursive formula.
There is a simple way how to achieve this without using the Lucas numbers as
an auxiliary sequence:
F[2n] = 2*F[n+1]^2 - 3*F[n]^2 - (-1)^n
F[2n+1] = F[n+1]^2 + F[n]^2
Emil Jerabek
- Fibonacci,
Emil Jerabek <=