06-14-2014, 06:03 PM
This occurs whenever recursion depth goes beyond the "Recursive Function" parameter in the CAS Setting. The maximum limit for this parameter seems to be 100. That is not very deep for recursive algorithms, especially since the Prime does not seem to do tail recursion optimization. Here is a simple example:
Calling f(99,1) works but if I call this as f(100,1) then I get the warning message "Running non recursive evaluator", which requires a click to exit (and seems to be much slower). Is there a way to do deeper recursion? Ideally, the limit should be much higher or even unbounded (with run-time error for stack overflow), but I would be content to have tail recursion!
PS, the typo "Rescursive Evaluation" in CAS Settings is still there in the new firmware.
Code:
(x,a)->BEGIN
IF x=0 THEN RETURN(a); ELSE RETURN(f(x-1,x*a)); END;
END
PS, the typo "Rescursive Evaluation" in CAS Settings is still there in the new firmware.