in reply to (ichimunki) Re x 4: Ackerman vs. Perl : KO in 3 rounds
in thread Ackerman vs. Perl : KO in 3 rounds
That gives the right answer for A(3,3), but blows up with reading from a bad memory location on A(4,3).sub A { return 0 if $_[1] == 0; return 2*$_[1] if $_[0] == 0; return 2 if $_[1] == 1; my $mm= $_[0]-1; --$_[1]; $_[1]= &A; $_[0]= $mm; return &A; }
|
|---|