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**456356 > That's not very practical. That computation will produce a value with more than 3.4 million digits. (That is, log10(34564323)*456356 = 3440298.) Python will attempt this, but I was not patient enough to see if it could calculate an answer today (or even this week).
I doubt that you really *want* all 3.4 million digits. So what is it you really want? A scientific or engineering result as a floating point number accurate to some reasonable number of digits? That integer value modulo some other integer (as used in various cryptology schemes)? Gary Herron -- http://mail.python.org/mailman/listinfo/python-list