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 Camion
Recipients Camion, gvanrossum, mark.dickinson, rhettinger, steven.daprano, tim.peters
Date 2021-01-11.19:49:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610394556.78.0.223322703785.issue42886@roundup.psfhosted.org>
In-reply-to
Content
@mark.dickinson, I fell on this problem in the reached precision evaluation, of a multiprecision algorithm designed to compute decimals of PI (using "John Machin like" formulas). 

The fact is that fractions module is really nice to implement this kind of multiprecision algorithm and math.log10 on each subsequent term of the series gives you an immediate evaluation of the current reached precision.

I agree that the solution I used work pretty well, but it makes me sad because it's far from beautifull.

I think one should consider that there are two cases with different objectives : floats and the likes which target speed, and those multiprecision types which target - well... precision. I wonder if the solution would not be to implement those functions in the fractions and decimal libraries (just calling log on integer for numerator and denominator).
History
Date User Action Args
2021-01-11 19:49:16Camionsetrecipients: + Camion, gvanrossum, tim.peters, rhettinger, mark.dickinson, steven.daprano
2021-01-11 19:49:16Camionsetmessageid: <1610394556.78.0.223322703785.issue42886@roundup.psfhosted.org>
2021-01-11 19:49:16Camionlinkissue42886 messages
2021-01-11 19:49:16Camioncreate