math.pow(x,y)

K.S.Sreeram sreeram at tachyontech.net
Sun Jun 11 15:57:37 EDT 2006


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
Sreeram

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20060612/04a8f6f6/attachment.sig>


More information about the Python-list mailing list