[issue39576] Surprising MemoryError in `decimal` with MAX_PREC
Stefan Krah
report at bugs.python.org
Fri Feb 7 10:55:35 EST 2020
Stefan Krah <stefan at bytereef.org> added the comment:
The feature would be nice to have; however, if you choose the precision to match the amount of available RAM things work (I have 8GB here, one word in the coefficient has 19 digits for the 4 bit version):
>>> from decimal import *
>>> c = getcontext()
>>> c.prec = 8 * 2**30 // 64 * 19
>>> c.prec
2550136832
>>> i = Decimal(4)
>>> i / 2
Decimal('2')
So I wonder if we really need to do something here.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39576>
_______________________________________
More information about the Python-bugs-list
mailing list