mpmath is a free Python library for real and complex floating-point arithmetic with arbitrary precision.