For the below code,
def squareroot(a):
x = 1
def apply(x):
if x*x == a:
return x
else:
return apply((x + a/x)/2)
result = squareroot(2)
print(result)
the following error is reported:
RuntimeError: maximum recursion depth exceeded in comparison
Do we have any 'option' to pass python interpreter which increases the size of stack frame before running this code?