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.
unknown (Guest)
on 2006-05-27 19: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
C Erler (Guest)
on 2006-05-28 19:53
(Received via mailing list)
On 27/05/06, removed_email_address@domain.invalid 
<removed_email_address@domain.invalid> 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.