I'm currently working in python.
when defining a recursive function
def f(n):
    if n < 1: return 0
    return f(n-1)
this works perfectly fine with f(800), but gives RecursionError with f(1000)
and I know that RecursionError happens when recursion goes to depth 995 (or 996, 994, not really sure). 
my question is why does RecursionError exist in the first place
 
    