Skip to content

Instantly share code, notes, and snippets.

@EDDYMENS
Created January 23, 2024 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EDDYMENS/ffa548c4d5ba6c3fcd55e270769a05af to your computer and use it in GitHub Desktop.
Save EDDYMENS/ffa548c4d5ba6c3fcd55e270769a05af to your computer and use it in GitHub Desktop.
from decimal import Decimal
number = 2
x = (number/2)
for _ in range(10000):
x = Decimal( x - ( ((x**2)-2) / (2*x) ) )
print(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment