Last active
November 12, 2023 06:14
-
-
Save lpereira/fe46ded39352c3ddf06bff95c6b6bfad to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/python | |
# https://www.youtube.com/watch?v=hm5qmqHUudQ | |
def regressao_julia(d, k): | |
# A fórmula enorme, segundo a jornalista: | |
return (d - k*k) // (k+k) | |
def raiz(n): | |
tentativa = n | |
while True: | |
r = regressao_julia(n, tentativa) | |
print(r, tentativa) | |
if r == 0: | |
return tentativa | |
tentativa += r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment