Skip to content

Comment on On calculating Fibonacci numbers in C

Comments

I used to use the two bucket method to generate a Fibonacci number, thanks for showing me another way to do it.

I am working on Ackermann Numbers now, but it takes a very long time to generate them and I have to either write my own classes to handle big numbers or using a different library to use large numbers. I moved from C to C++ to do that. Your unsigned long int variable would run out of room after the 96th Fibonacci number, and you might have to move to C++ and use a custom class as well to be able to handle those big numbers.

Note that the author did write "since the 96th Fibonacci number is the largest to fit in an unsigned long int".

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.