Closed
Description
There are some (potentially dangerous) arithmetic errors often occurring with long 100% CPU delays with the Unix port defaults (cannot test other ports) when dealing with large numbers.
CPython:
>>> (2**256 - 2**32)**2 // (2**256 - 2**32) 115792089237316195423570985008687907853269984665640564039457584007908834672640
MicroPython 1.13 (takes approximately 1 minute):
>>> (2**256 - 2**32)**2 // (2**256 - 2**32) 1766847064778390606685032887445983096815437806911733293014036620377194496
MicroPython 1.13 (immediate, with DIG_SIZE = MPZ_DIG_SIZE - 1):
>>> (2**256 - 2**32)**2 // (2**256 - 2**32) 115792089237316195423570985008687907853269984665640564039457584007908834672640
Is it safe to change the default DIG_SIZE to MPZ_DIG_SIZE - 1?