OverflowError:数学范围错误

时间:2010-06-07 10:19:49

标签: python math

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

我该如何解决?

1 个答案:

答案 0 :(得分:18)

使用内置操作符。

2**3000