I am at early stage of learning Python. I tried calculating Ackerman function for smaller values. It worked just fine until the values are (3,7). Any value higher than that (say 3,8) throws this error. [Process finished with exit code -1073741571 (0xC00000FD)]
At first I checked whether recursion limit is reached, but the process stopped well below the set Recursion limit (in this case it is set to maximum)
import sys
sys.setrecursionlimit(999999999)
count = 0
def cf():
global count
count+=1
cf()
def Ack(m,n):
if m==0:
x=n+1
cf()
return x
elif m>0 and n==0:
x=Ack(m-1,1)
cf()
return x
elif m>0 and n>0:
x=Ack(m-1,Ack(m,n-1))
cf()
return x
a,b=map(int,input("Enter values").split())
print(a,b)
result=Ack(a,b)
print(result)
print(count)