From: Ethan Price Date: 2006-11-17T02:39:46+09:00 Subject: Bignum doesn't work.....? ------=_Part_130070_9411311.1163698783437 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Forgive me if this has been answered, I have look all around and can't seem to find an answer. I am trying to implement the Fermat primality test ( http://en.wikipedia.org/wiki/Fermat_primality_test ) in Ruby. The problem is everytime ruby does the a^(n-1) computation, it seems to stumble on numbers like 1000 (so its doing a^999). I have set both a and n to fixnums, and according to everything I have read, it should switch to bignum if the result is too big. But it doesn't seem to do that, it just seems to spit out infinity. Any ideas? I used the latest one click installer to install Ruby. Ethan ------=_Part_130070_9411311.1163698783437--