Python:OverflowError:数学范围错误

标签 python math overflow

当我尝试这个计算时,我得到一个溢出错误,但我不知道为什么。

1-math.exp(-4*1000000*-0.0641515994108)

最佳答案

您要求 math.exp 计算的数字(十进制)超过 110,000 位。这稍微超出了 double 的范围,因此会导致溢出。

关于Python:OverflowError:数学范围错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4050907/

相关文章:

c - 如何在发生之前或之后检测 GMP 中的尾数精度溢出?

forms - 框阴影出现在表格下方

css - "overflow: hidden;"被 PC 上的 Chrome 忽略

python - 为什么在 python 中使用 re.split() 时会得到那些空字符串?

python - 如何找到赢家通吃的最高值(value)

javascript - Ajax 请求不返回所有 JSON - 无法加载资源 : the server responded with a status of 409 (Conflict)

c# - 如何强制数字在 C# 中的范围内?

php - SQL 或 PHP 错误?距离计算

python - "Open-ended"字典键? (LPTHW 练习 48 相关)

java - 根据点偏移计算方向