我需要得到平方根的上限,比如10**10001 (10^10001)。如果我这样做了: from math import sqrt
print(int(sqrt(10**10001))+1) 我看了一下,它给了我一个OverflowError。OverflowError来自math.sqrt(x)函数。如果有人能帮上忙,我将不胜感激。
我正在将python代码转换为js,但无法解析这个x= int(num ** 0.5) (num是大整数) 如何在javascript BigInt中计算?); //example
num = BigInt(Math.round(parseInt(num.toString()) ** 0.5 )); // result is exact same as python