From: Victor Reyes Date: 2007-05-05T05:25:40+09:00 Subject: Re: Help with bigbnum ------=_Part_44289_21906552.1178310339242 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline For the record, I am running ruby 1.86 under AIX 5.3. If the answer is that it can be done on Ruby, that's an OK answer also. If this is the case, I start playing with Python, at least for this problem. Thanks Victor On 5/4/07, Mark Day wrote: > > On May 4, 2007, at 10:36 AM, Jason Roelofs wrote: > > > You do realize the magnitude of number you're trying to calculate? > > There IS > > a limit to how big even BigNum can go before deciding to crap out. > > I'd like > > to see someone try this in Lisp. If that interpreter can't handle > > it, then > > no language can. > > Python 2.5 appears to have handled the expression easily enough (3-4 > seconds on my iMac Intel Core Duo). Converting it to a string for > display seems to be taking quite a long time, which isn't too > surprising since it should have nearly 2 million decimal digits > (according to log10(n)). > > -Mark > > > Jason > > > > On 5/4/07, Victor Reyes wrote: > >> > >> I am trying to use the following computation: 232582656(232582657-1) > >> > >> n = (2**32582656) * (2**32582657 - 1) > >> > >> I am getting the msg: > >> > >> perf.rb:5: warning: in a**b, b may be too big Infinity > >> > >> Any help will be appreciated. > >> > >> Thank you > >> > >> Victor > >> > > > ------=_Part_44289_21906552.1178310339242--