+ 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.

15th Oct 2017, 3:56 PM
Prabhakar Dev
Prabhakar Dev - avatar
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 :)
16th Oct 2017, 2:58 AM
Kirk Schafer
Kirk Schafer - avatar