4 ms·
I take it you are making a joke? Heh. Otherwise, I'd point out that any result where you ultimately need to use Fibonacci(n) as an actual integer, you can't re
by tanderson92 11y ago
I take it you are making a joke? Heh.
Otherwise, I'd point out that any result where you ultimately need to use Fibonacci(n) as an actual integer, you can't represent it as an algebraic combination of "sqrt(5)".
- panic 11y agoNo joke! See this thread: https://news.ycombinator.com/item?id=11561336 https://news.ycombinator.com/item?id=11561336 for some real-life implementations of this technique. Since the Fibonacci numbers are integers, at the end of your computation you'll get a number like "a + 0 sqrt(5)". Then you can just take the "a" part.
- tanderson92 11y agoAh! I see what you're saying. Thank for the link, that is a clever approach.