+ 3
Can anyone help?
the following recursion is out of my mind x,n=int(input('Enter any number (except 0)')),100 for y in range(n): x=(2*x+1)/x print(x) the output nearly equates √2+1. increasing n approaches the value more and more.
1 Odpowiedź
+ 4
It's one of the solutions to the quadratic equation applied to this formula.
If this is mostly a math question, https://math.stackexchange.com may be a good resource. Otherwise, you may catch more people if it looks more like a programming problem :)