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 serhiy.storchaka
Recipients mark.dickinson, rhettinger, serhiy.storchaka, stutzbach, tim.peters
Date 2019-06-02.11:39:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1559475547.09.0.51301349465.issue37132@roundup.psfhosted.org>
In-reply-to
Content
Actually it was ilog2. There was just an error in the documentation.

Currently we have two ways to represent the number as an integer ratio. The official way is two properties numerator and denominator, every number should have them. And some concrete numeric types have the as_integer_ratio() method which returns both values. Rather of adding as_integer_ratio() to all other numeric types I propose to add a helper function which uses either the as_integer_ratio() method if available, or  the numerator and denominator properties. Currently any code that uses the as_integer_ratio() method should implement a fallback to numerator and denominator. With imath.as_integer_ratio() it can just use this function.

> Radical suggestion: should we consider delaying the inclusions of `comb`, `perm` and `isqrt` in the math module so that we can do this properly for 3.9?

I like it. I suggest to delay also adding the int.as_integer_ratio() method. Currently it does not help because there are other numeric methods without the as_integer_ratio() method.
History
Date User Action Args
2019-06-02 11:39:07serhiy.storchakasetrecipients: + serhiy.storchaka, tim.peters, rhettinger, mark.dickinson, stutzbach
2019-06-02 11:39:07serhiy.storchakasetmessageid: <1559475547.09.0.51301349465.issue37132@roundup.psfhosted.org>
2019-06-02 11:39:07serhiy.storchakalinkissue37132 messages
2019-06-02 11:39:07serhiy.storchakacreate