
Feb. 19, 2022
1:35 p.m.
It crashes because it tries to convert 10**400 to a float and that fails:
10**400 / 1e200 Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> 10**400 / 1e200 OverflowError: int too large to convert to float
But with two ints it succeeds:
10**400 / 10**200 1e+200
Note that 1e200 is an integer:
1e200.is_integer() True
So that could losslessly be converted to int, and then the division would succeed:
10**400 / int(1e200) 1e+200
So could/should 10**400 / 1e200 be implemented to do that instead of raising the error? Or is it a too rare use case and not worth the effort, or does something else speak against it?