Path: utzoo!utgpu!water!watmath!clyde!att!ihnp4!ihlpf!nevin1
From: nevin1@ihlpf.ATT.COM (00704a-Liber)
Newsgroups: comp.lang.c
Subject: Re: Should I convert FORTRAN code to C?
Message-ID: <5296@ihlpf.ATT.COM>
Date: 14 Jul 88 23:35:29 GMT
References: <2742@utastro.UUCP> <4700015@m.cs.uiuc.edu> <5236@ihlpf.ATT.COM> <901@garth.UUCP>
Reply-To: nevin1@ihlpf.UUCP (00704a-Liber,N.J.)
Organization: AT&T Bell Laboratories - Naperville, Illinois
Lines: 21

In article <901@garth.UUCP> smryan@garth.UUCP (Steven Ryan) writes:
>I (Nevin Liber) wrote:

>>If you are using an auxiliary stack, then you haven't eliminated recursion,
>>you have just moved it from being implicitly done by the function call

>Recursion usually refers to direct or indirect self-calling. Using an
>explicit auxillary stack with a loop is then elimenating recursion.

I don't buy that.  The 'algorithm' you are using is STILL recursive; all
you have done is change the 'implementation' of the recursion.  If you can
eliminate the stack, then and only then have you eliminated the recursion.

BTW, this is why tail recursion can truly be eliminated.  With tail recursion,
you need not store *any* values (state information) on the stack (because you
never return to it), and the stack is effectively eliminated.
-- 
 _ __			NEVIN J. LIBER	..!att!ihlpf!nevin1	(312) 979-????
' )  )				You are in a twisty maze of little
 /  / _ , __o  ____		 email paths, all different.
/  (_