[issue35588] Speed up mod/divmod for Fraction type

Stefan Behnel report at bugs.python.org
Wed Dec 26 07:30:19 EST 2018


Stefan Behnel <stefan_ml at behnel.de> added the comment:

Similarly, I think "//" (__floordiv__) should be implemented using integer operations rather than math.floor():

    (a.numerator * b.denominator) // (b.numerator * a.denominator)

Thoughts?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35588>
_______________________________________


More information about the Python-bugs-list mailing list