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 belopolsky, facundobatista, mark.dickinson, rhettinger, serhiy.storchaka, skrah, stutzbach, wolma
Date 2017-11-08.14:36:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510151769.78.0.213398074469.issue31978@psf.upfronthosting.co.za>
In-reply-to
Content
I thought about adding a public function in the math module when worked on one of that functions. But there are not many cases for it in the stdlib (datetime, fractions, decimal, and maybe it's all). I don't know whether there is a common enough need in third-party code. But there is a parallel with math.remainder().

If add this function, I would implement it in C and add in the math module. It already contains integer specific functions factorial() and gcd(). There was a proposition to add as_integer_ratio() (which will work with arbitrary rationals). All together they will create a small integer mathematics domain in the math module. Or can be extracted in a special module. Later it can be extended by adding functions for binomial coefficients and the number of permutations and generators of prime and Fibonacci numbers.
History
Date User Action Args
2017-11-08 14:36:09serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, facundobatista, mark.dickinson, belopolsky, stutzbach, skrah, wolma
2017-11-08 14:36:09serhiy.storchakasetmessageid: <1510151769.78.0.213398074469.issue31978@psf.upfronthosting.co.za>
2017-11-08 14:36:09serhiy.storchakalinkissue31978 messages
2017-11-08 14:36:09serhiy.storchakacreate