Forum: Ruby Re: Fast Fibonacci method

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
67bb4df2775f6a6b603347dce7119571?d=identicon&s=25 unknown (Guest)
on 2006-05-27 17:58
(Received via mailing list)
Dear Erlercw,

if you want to implement the Fibonacci calculation to show some
benchmark using the recurrence formula F_{n+2}=F_{n+1}+F_{n},
this isn't for you.

But I'd bet  that the formula 1.3.3 in

_http://www.math.upenn.edu/~wilf/gfology.pdf_
(http://www.math.upenn.edu/~wilf/gfology.pdf)

is faster (on any machine/computer language ) as it involves
multiplying the
same factors all the time. One could just do one multiplication
using logarithms, actually, and then convert back the result.

Best regards,

Axel
E2a9d30a2487a924165aaaa016b54f87?d=identicon&s=25 C Erler (Guest)
on 2006-05-28 17:53
(Received via mailing list)
On 27/05/06, Nuralanur@aol.com <Nuralanur@aol.com> wrote:
> (http://www.math.upenn.edu/~wilf/gfology.pdf)
>
> is faster (on any machine/computer language ) as it involves  multiplying
> the
> same factors all the time. One could just do one multiplication
> using logarithms, actually, and then convert back the result.
>
> Best regards,
>
> Axel


Thanks for your suggestion.  I tried various methods of implementing
that
formula, taking care to get exact results, but I can't figure out how to
speed them up enough.
This topic is locked and can not be replied to.