Search code examples
pythonpython-3.xarbitrary-precision

Ultra-high-precision decimal numbers


I'm working on a program that finds fractional approximations of pi. As of right now, the best approximation is 245850922/78256779, which yields 64 decimal spots using the Decimal object built into Python 3. I am looking for a method to store decimal values to arbitrary positions, but I have not found any working methods for Python 3. Any help is appreciated.


Solution

  • See at mpmath project.

    Main page contains example of pi number calc using mpmath lib with depth of 50 digits. At least you can try to set it greater and see what will happens.