Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
supernewton
on July 31, 2023
|
parent
|
context
|
favorite
| on:
The Fibonacci Matrix
> If a and b are the golden ratio and its conjugate, then f_n = a^n + b^n. But since |b| < 1, you can just do f_n = nearest_integer(a^n).
Well, almost. You need to multiply by a factor of 1/sqrt(5) before rounding.
srean
on Aug 1, 2023
[–]
I sketched an alternative accurate way to the calculations here
https://news.ycombinator.com/item?id=36952832
It is not faster though.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Well, almost. You need to multiply by a factor of 1/sqrt(5) before rounding.