User:Albedo: Difference between revisions

Content added Content deleted
m (→‎Ackermann Function: missing word)
Line 495: Line 495:
A(0,2) = 3 ,A(m,n)= n+1 if m=0
A(0,2) = 3 ,A(m,n)= n+1 if m=0


The coefficients and the results can found in the stack. See the places marked with square brackets [] and Labels in the program/stack flow above.
The coefficients and the results can be found on the stack. See the places marked with square brackets [] and Labels in the program/stack flow above.
At each turn, the upper two values on the stack are flipped, so they are in the proper order for computing inner functions. For highly nested A(...,(A(A(A(...))))) functions the stack can grow to enormous proportions very fast, then computing its way outwards again, from innermost functions outwards. The innermost coefficients are always on top of the stack.
At each turn, the upper two values on the stack are flipped, so they are in the proper order for computing inner functions. For highly nested A(...,(A(A(A(...))))) functions the stack can grow to enormous proportions very fast, then computing its way outwards again, from innermost functions outwards. The innermost coefficients are always on top of the stack.