Created
July 28, 2020 15:34
-
-
Save CodeDrome/cfee48d587232ca5bd06a51b66d4654a to your computer and use it in GitHub Desktop.
estimatingpi.py part 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def john_machin(): | |
""" | |
Formula discovered by English astronomer John Machin in 1706 | |
""" | |
print("John Machin\n===========") | |
pi = (4.0 * math.atan(1.0 / 5.0) - math.atan(1.0 / 239.0)) * 4.0 | |
print_as_text(pi) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment