Re: math.pow(x,y)

2006-06-11 Thread casevh
K.S.Sreeram wrote: > Raymond L. Buvel wrote: > > I just tried this and it is taking an extremely long time even on a fast > > machine with 4 Gb of RAM. Killed it after a couple of minutes. > > You probably tried printing the value. > > a = 34564323**456356 (takes just 28 seconds) > whereas > b =

Re: math.pow(x,y)

2006-06-11 Thread Raymond L. Buvel
K.S.Sreeram wrote: > Raymond L. Buvel wrote: >> I just tried this and it is taking an extremely long time even on a fast >> machine with 4 Gb of RAM. Killed it after a couple of minutes. > > Thats odd. > 34564323**456356 completed on my laptop in 28 seconds. > [Python 2.4.3, Celeron-M 1.3GHz, Win

Re: math.pow(x,y)

2006-06-11 Thread Tim Peters
[Wojciech Muła] >> You have to use operator **, i.e. 34564323**456356 Or the builtin pow() instead of math.pow(). [Gary Herron] > That's not very practical. That computation will produce a value with > more than 3.4 million digits. Yes. > (That is, log10(34564323)*456356 = 3440298.) Python will

Re: math.pow(x,y)

2006-06-11 Thread K.S.Sreeram
Raymond L. Buvel wrote: > I just tried this and it is taking an extremely long time even on a fast > machine with 4 Gb of RAM. Killed it after a couple of minutes. You probably tried printing the value. a = 34564323**456356 (takes just 28 seconds) whereas b = str(a) takes forever! Regards Sreer

Re: math.pow(x,y)

2006-06-11 Thread K.S.Sreeram
Raymond L. Buvel wrote: > I just tried this and it is taking an extremely long time even on a fast > machine with 4 Gb of RAM. Killed it after a couple of minutes. Thats odd. 34564323**456356 completed on my laptop in 28 seconds. [Python 2.4.3, Celeron-M 1.3GHz, WinXP], and max memory consumption

Re: math.pow(x,y)

2006-06-11 Thread Raymond L. Buvel
Felipe Almeida Lessa wrote: > Em Dom, 2006-06-11 às 11:19 -0700, fl1p-fl0p escreveu: >> import math >> math.pow(34564323, 456356) >> >> will give math range error. >> >> how can i force python to process huge integers without math range >> error? Any modules i can use possibly? > > 34564323**45635

Re: math.pow(x,y)

2006-06-11 Thread Gary Herron
Wojciech Muła wrote: > fl1p-fl0p wrote: > >> import math >> math.pow(34564323, 456356) >> >> will give math range error. >> >> how can i force python to process huge integers without math range >> error? Any modules i can use possibly? >> > > You have to use operator **, i.e. 34564323**4563

Re: math.pow(x,y)

2006-06-11 Thread Wojciech Muła
fl1p-fl0p wrote: > import math > math.pow(34564323, 456356) > > will give math range error. > > how can i force python to process huge integers without math range > error? Any modules i can use possibly? You have to use operator **, i.e. 34564323**456356 -- http://mail.python.org/mailman/listinfo

Re: math.pow(x,y)

2006-06-11 Thread Felipe Almeida Lessa
Em Dom, 2006-06-11 às 11:19 -0700, fl1p-fl0p escreveu: > import math > math.pow(34564323, 456356) > > will give math range error. > > how can i force python to process huge integers without math range > error? Any modules i can use possibly? 34564323**456356 ? -- Felipe. -- http://mail.pytho

math.pow(x,y)

2006-06-11 Thread fl1p-fl0p
import math math.pow(34564323, 456356) will give math range error. how can i force python to process huge integers without math range error? Any modules i can use possibly? -- http://mail.python.org/mailman/listinfo/python-list