Description:
- Python library for real and complex floating-point arithmetic with arbitrary precision.
Resources:
- [GitHub] https://github.com/mpmath/mpmath
- [Website] https://mpmath.org/
- [Docs] https://mpmath.org/doc/current/
- [Examples] https://fredrikj.net/blog/2011/03/100-mpmath-one-liners-for-pi/
Example 1
Section titled “Example 1”Computes 50 digits of pi by numerically evaluating the Gaussian integral
from mpmath import mp
mp.dps = 50print(mp.quad(lambda x: mp.exp(-x**2), [-mp.inf, mp.inf]) ** 2)ganymede is made by Eugo