From: Paul Lutus Date: 2006-09-02T18:35:34+09:00 Subject: Re: Bignum limits ? Jean-Claude Arbaut wrote: > Hi, > > is there a limit on a Bignum size ? AFAIK no, apart from increasingly long computation times. > I get this: > > irb> a=2**262144; a % 10**20 > => 62605349934298300416 > > irb> a=2**262145; a > (irb):1: warning: in a**b, b may be too big > => Infinity What version of Ruby do you have? I ran the same test and didn't get this message. And what platform? Mine: $ ruby -v ruby 1.8.4 (2005-12-24) [i386-linux] Using irb I computed 2**262145 and compared it to an authoritative source, it is correct, no errors or warnings. // snip examples > Is there a bug in the ** method ? On my system, using your examples, I cannot produce any of the warnings you are showing, and the results look correct. -- Paul Lutus http://www.arachnoid.com