Serhiy Storchaka added the comment:

>>> from fractions import Fraction
>>> Fraction(78*6e-8) / Fraction(6e-8)
Fraction(353610802237278976, 4533471823554859)
>>> Fraction(78*6e-8) // Fraction(6e-8)
77
>>> float(Fraction(78*6e-8) / Fraction(6e-8))
78.0
>>> Fraction(78*6e-8) / Fraction(6e-8) - 78
Fraction(-26, 4533471823554859)

The root of the issue is that

>>> Fraction(78*6e-8) != Fraction(78*6, 10**8)
True
>>> Fraction(6e-8) != Fraction(6, 10**8)
True

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25129>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to