The Billionth Fibonacci Number

Jun 02, 2008 23:42

A few weeks ago, rockstarling wrote a post about calculating large Fibonacci numbers. Never one to resist a program challenge, I really wanted to try my hand at it and see if I could write an even faster program for calculating Fibonacci numbers. At the time, I was rather busy working on a paper but that's done now, so I gave it a shot today. ( Read more )

Leave a comment

Comments 4

lindseykuper June 4 2008, 17:08:29 UTC
*whistles*

Awesome! And screamingly fast. I like the bitwise successive squaring thing, and I'm...trying to understand the rest.

I still like the fact that you can do it in Scheme without any special libraries.

Reply

jes5199 June 4 2008, 19:07:00 UTC
the GMP library is really, really nice. And if you use the C++ bindings, it's almost invisible.
It's so good that I just assumed that most GNU languages with Bignum/Bigint types would be using it be using GMP internally. Not true! This seems to be a bizarre application of Greenspun's Tenth Rule of Programming, where even Scheme has re-invented the wheel.

Reply

lindseykuper June 4 2008, 19:34:51 UTC
I just realized that it's what oniugnip has been talking about all this time when he's been talking about "the bignum library".

Reply


Leave a comment

Up