Python: OverflowError: math range error

后端 未结 6 701
轻奢々
轻奢々 2020-12-09 14:56

I get a Overflow error when i try this calculation, but i cant figure out why.

1-math.exp(-4*1000000*-0.0641515994108)
6条回答
  •  自闭症患者
    2020-12-09 15:55

    The number you're asking math.exp to calculate has, in decimal, over 110,000 digits. That's slightly outside of the range of a double, so it causes an overflow.

提交回复
热议问题