This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Sergey.Kirpichev
Recipients Sergey.Kirpichev, asmeurer, mark.dickinson, rhettinger, terry.reedy, tim.peters
Date 2021-03-13.04:27:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615609642.98.0.945927791866.issue43420@roundup.psfhosted.org>
In-reply-to
Content
> a short paragraph or section on alternative implementations

There are no alternative implementations.  SymPy's PythonRational (AFAIR, this class not in the default namespace) is an internal fallback solution, for case when no gmpy2 is available.

Maybe we should list gmpy2 everywhere people expect fast bigint/rationals (i.e. int docs, math module, Fraction and so on), so they will not not be disappointed...

> complexity (and assured correctness)

Much more complex (IMHO) code was accepted (there were examples for C, but the limit_denominator() method - an example for Python code, from the same module!).

In fact, it pretty obvious that output fractions are equal to the middle-school versions.  Non-trivial part may be why they are normalized.  I hope, now this covered by comments.
History
Date User Action Args
2021-03-13 04:27:23Sergey.Kirpichevsetrecipients: + Sergey.Kirpichev, tim.peters, rhettinger, terry.reedy, mark.dickinson, asmeurer
2021-03-13 04:27:22Sergey.Kirpichevsetmessageid: <1615609642.98.0.945927791866.issue43420@roundup.psfhosted.org>
2021-03-13 04:27:22Sergey.Kirpichevlinkissue43420 messages
2021-03-13 04:27:22Sergey.Kirpichevcreate