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 scoder
Recipients eric.smith, ezio.melotti, mark.dickinson, martin.panter, rhettinger, scoder, serhiy.storchaka, skrah, tuomas.suutari, wolma
Date 2015-03-29.17:21:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427649668.6.0.257435552081.issue23602@psf.upfronthosting.co.za>
In-reply-to
Content
But these parameters could also be partly delegated to normal string (not number) formatting, right?

One of the advantages of not depending on Decimal is, well, to not depend on Decimal, which is a rather uncommon dependency when using Fractions in an application.

I think it could avoid some more calculations to first multiply the nominator by 10**prec, then round(), int() and str() the result, and then split the string at "-prec".

BTW, if "division with remainder" wasn't (sadly) linear time, that would definitely be the most beautiful algorithm here. :)
History
Date User Action Args
2015-03-29 17:21:08scodersetrecipients: + scoder, rhettinger, mark.dickinson, eric.smith, ezio.melotti, skrah, martin.panter, serhiy.storchaka, wolma, tuomas.suutari
2015-03-29 17:21:08scodersetmessageid: <1427649668.6.0.257435552081.issue23602@psf.upfronthosting.co.za>
2015-03-29 17:21:08scoderlinkissue23602 messages
2015-03-29 17:21:08scodercreate