If the recursion depth exceeds this limit, a RecursionError will occur. However, the code should work fine with reasonable-sized numbers.