in reply to Re: Re (tilly) 1: Ackerman vs. Perl : KO in 3 rounds
in thread Ackerman vs. Perl : KO in 3 rounds

Sorry. Perl can't detect tail-end recursion for you. In fact Perl's handling of deep recursion is truly horrible.

As for whether my answers are right or wrong, they agree with this page...

  • Comment on Re (tilly) 3: Ackerman vs. Perl : KO in 3 rounds

Replies are listed 'Best First'.
Re: Re (tilly) 3: Ackerman vs. Perl : KO in 3 rounds
by John M. Dlugosz (Monsignor) on Dec 19, 2001 at 22:01 UTC
    The version of the function I was using is expressed cleanly by VSarkiss in this node. It gives 65536.

    The Perl code reads exactly from the piece definition, adding a few $ symbols, a *, and semi's. It makes every condition explicit, and don't rely on narrowing constraints and order of definition. So I'm pretty sure that's a correct implementation.

    I suppose there are multiple versions of Ackerman's idea, all working in the same way, but different in detail.

    —John

      VSarkiss was just trying to rewrite what you wrote more cleanly. But do a search for Ackermann's function and you consistently come up with the function as I wrote it.

      Incidentally as noted in this biography, what Ackermann actually came up with was a function of 3 variables. This was later simplified by Rosza Peter then Raphael Robinson into the current textbook form which I wrote.