Baking 1000 Digits of Pi from 3 Small Lines of Python

John Clark Craig
4 min readApr 16, 2021

Python’s mpmath module is a powerful tool for high accuracy calculation that you should know

You likely know that integers in Python can grow to any reasonable size. For example, here’s a short Python program that starts with 1 and multiplies by 256 with each step. After 20 steps the resulting integer is larger than many programming languages can handle:

--

--

John Clark Craig

Author, inventor, entrepreneur — passionate about alternate energy, technology, and how Python programming can help you hack your life.