4 ms·
For MP work in Python, gmpy2 - https://pypi.org/project/gmpy2/ https://pypi.org/project/gmpy2/ comes with a much better selection of MP functions, backed by MPF
by m4r35n357 7y ago
For MP work in Python, gmpy2 - https://pypi.org/project/gmpy2/ https://pypi.org/project/gmpy2/ comes with a much better selection of MP functions, backed by MPFR, MPC.
Also, the buit-in Decimal class is horribly slow by comparison to gmpy2.
- fdej 7y agoAlso (shameless self-promotion) python-flint! http://fredrikj.net/python-flint/ http://fredrikj.net/python-flint/
- baruchel 7y agoPurpose of the Decimal module is not really arbitrary precision computation but rather exact computation on decimal numbers wherever it matters (financial arithmetic, etc.). This module should never be used for scientific purposes.