Can this implementation of Ackermann function be called tail recursive?
问题 I have written following code in C. Can we call it a tail recursive implementation? #include <stdio.h> int ackermann(unsigned int *m, unsigned int *n, unsigned int* a, int* len) { if(!*m && *len == -1) { return ++*n; } else if(!*m && *len >= 0) { ++*n; *m = a[(*len)--]; } else if(*n == 0) { --*m; *n = 1; } else { ++*len; a[*len] = *m - 1; --*n; } return ackermann(m, n, a, len); } int main() { unsigned int m=4, n=1; unsigned int a[66000]; int len = -1; for (m = 0; m <= 4; m++) for (n = 0; n <