Tim Peters <t...@python.org> added the comment:

Formulas based on physical RAM probably work well on Linux, but not so well on 
Windows:  Windows has no "overcommit".  Whether a virtual memory request 
succeeds on Windows depends on how much RAM (+ swap space, if any) has already 
been requested across all processes.  It doesn't matter whether pages have 
actually been created, merely the total number of pages that _may_ be created.

I never bumped into this issue before, because I never used MAX_PREC before ;-) 
 When I intended to do exact arithmetic in `decimal`, I did this instead:

- guesstimated the max number of decimal digits a computation would need

- set `prec` to be comfortably - but not massively - larger than that

- enabled the Inexact trap, so if I guessed too low I'd get an exception

Maybe the docs could suggest that instead?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to