Stefan Pochmann writes:
Mark Dickinson wrote:
Unrelated question: under this proposal, what would you want `Fraction(10**400) / 1e200` to do?
Btw the full error message I get for that is "OverflowError: integer division result too large for a float". Even for `Fraction(10**400, 3) / 3.14`. Saying "integer division" when neither operand is an integer and I'm also not using `//` feels suboptimal.
In converting Fraction(m, n) to float, presumably you just do m / n, no?
float(Fraction(10**400, 10**399)) 10.0 float(Fraction(10**400, 3)) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/numbers.py", line 291, in __float__ return self.numerator / self.denominator OverflowError: integer division result too large for a float
Seems reasonable to me.