Skip to content

Instantly share code, notes, and snippets.

@gvitalie
Created September 13, 2025 14:43
Show Gist options
  • Save gvitalie/d555afbffe5d0d65e2524dfb4a785783 to your computer and use it in GitHub Desktop.
Save gvitalie/d555afbffe5d0d65e2524dfb4a785783 to your computer and use it in GitHub Desktop.
πŸ˜‡
import math
def sin(x):
a = 0
for i in range(30):
a += ((-1) ** i) * (x ** (2*i+1)) / math.factorial(2*i+1)
return a
a = 3
for i in range(3):
a += sin(a)
print(a, sin(a))
/home/me/Projects/AI/.venv/bin/python /home/me/Projects/AI/Bb.py
3.141120008059867 0.0004726455123287083
3.1415926535721956 1.759734884346061e-11
3.141592653589793 3.3280566969799443e-16
Process finished with exit code 0
@gvitalie
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment