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 mark.dickinson
Recipients U.W., mark.dickinson, serhiy.storchaka
Date 2020-05-27.12:31:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590582703.27.0.646175902423.issue40793@roundup.psfhosted.org>
In-reply-to
Content
Right; the naive algorithm for converting the internal binary representation to the decimal representation is quadratic time. In *theory* we could implement a subquadratic time algorithm, but the complexity of such an implementation outweighs the benefits. Python really isn't targeted at super-fast million-digit arithmetic; that's more the domain of libraries like GMP.

Closing as "won't fix". I'd recommend using gmpy2[1] instead. Alternatively, you may be able to make the `Decimal` type work with a suitably huge precision.

Related: #26256.

[1] gmpy2: https://gmpy2.readthedocs.io/en/latest/intro.html
History
Date User Action Args
2020-05-27 12:31:43mark.dickinsonsetrecipients: + mark.dickinson, serhiy.storchaka, U.W.
2020-05-27 12:31:43mark.dickinsonsetmessageid: <1590582703.27.0.646175902423.issue40793@roundup.psfhosted.org>
2020-05-27 12:31:43mark.dickinsonlinkissue40793 messages
2020-05-27 12:31:43mark.dickinsoncreate