When in python
and mpmath
one's code starts with
from mpmath import mp
mp.dps =200
My question is whether -depending on one's hardware- does there exist an upper limit to mp.dps
and how can one find this uper limit.
Please note that the actual precision is stored in binary bits and not decimal digits. mp.dps()
automatically does the conversion to binary bits.
By default, mpmath
uses the Python arbitrary-precision integers as the basis for its arithmetic. There are no limitations other than the memory in your system or your patience.
If you have gmpy2
installed, mpmath
will automatically use the faster integer type based on the GMP library. The GMP library has a maximum precision of 2^32 - 1 bits (roughly 1.29E9 decimal digits) on 32-bit systems and 2^37 - 1 bits (roughly 4.14E10 decimal digits) on 64-bit systems.
I'm not aware of any other limits.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.