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 skrah
Recipients jneb, mark.dickinson, serhiy.storchaka, skrah
Date 2016-02-02.19:10:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454440240.68.0.839073260237.issue26256@psf.upfronthosting.co.za>
In-reply-to
Content
Jurjen, this is very nice! -- Like Mark, I'm not sure if this should be in CPython.


Decimal (Python >= 3.3) has sneaked in a couple of fast bignum
algorithms, so calculating and converting the latest Mersenne
prime takes a couple of seconds:

from decimal import *

c = getcontext()
c.prec = MAX_PREC
c.Emax = MAX_EMAX
c.Emin = MIN_EMIN

x = Decimal(2)**74207281 - 1
s = str(x)
assert s[:12] == "300376418084"
assert s[-12:] == "391086436351"
History
Date User Action Args
2016-02-02 19:10:40skrahsetrecipients: + skrah, jneb, mark.dickinson, serhiy.storchaka
2016-02-02 19:10:40skrahsetmessageid: <1454440240.68.0.839073260237.issue26256@psf.upfronthosting.co.za>
2016-02-02 19:10:40skrahlinkissue26256 messages
2016-02-02 19:10:40skrahcreate