Python: OverflowError: math range error

后端 未结 6 712
轻奢々
轻奢々 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:43

    I think the value gets too large to fit into a double in python which is why you get the OverflowError. The largest value I can compute the exp of on my machine in Python is just sligthly larger than 709.78271.

提交回复
热议问题