tags:

views:

106

answers:

1
>>> import math
>>> math.pow(2, 3000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: math range error

How can I fix it? thanx.

+8  A: 

Use the built-in operator.

2**3000
Marcelo Cantos
This uses big ints.
Hamish Grubijan
@Hamish: yes, it does.
Marcelo Cantos