小编cub*_*eAD的帖子

Python 3中数字大于10 ^ 2000的平方根

我想在Python中计算一个大于10 ^ 2000的数字的平方根.如果我将此数字视为普通整数,我将始终得到此结果:

Traceback (most recent call last):
  File "...", line 3, in <module>
    print( q*(0.5)  )
OverflowError: int too large to convert to float
Run Code Online (Sandbox Code Playgroud)

我该如何解决?或者除了使用Python之外是否存在计算此平方根的可能性?

python python-3.x

3
推荐指数
2
解决办法
1038
查看次数

标签 统计

python ×1

python-3.x ×1