We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The thing about computing using that formula is that you're going to have to do floating-point calculations. This raises a couple of issues:
Can you easily estimate the amount of precision you're going to need to take a small number to a large number and have the rounding error be less than 0.5?
Is it even more efficient to use the closed form? Integer addition and modulo operations are faster than calculating exponentials and logarithms, and the extra storage space is neglible.
Is Fibo
You are viewing a single comment's thread. Return to all comments →
The thing about computing using that formula is that you're going to have to do floating-point calculations. This raises a couple of issues:
Can you easily estimate the amount of precision you're going to need to take a small number to a large number and have the rounding error be less than 0.5?
Is it even more efficient to use the closed form? Integer addition and modulo operations are faster than calculating exponentials and logarithms, and the extra storage space is neglible.