Ackerman 3 3 prints a few lines to the effect of "attempt to free unreferenced scaler at..." but the file name is messed up. Then it terminates with an attempted memory write to a protected location of 0x0000013b (i.e. a stray pointer).use warnings; use strict; sub A { return 0 if $_[1] == 0; return 2*$_[1] if $_[0] == 0; return 2 if $_[1] == 1; # figure A(m-1, A(m, n-1)) using in-place parameter list to save stac +k. --$_[1]; $_[1]= &A; --$_[0]; return &A; } print A ($ARGV[0], $ARGV[1]);
Anybody else care to try?
—John
In reply to Ackerman vs. Perl : KO in 3 rounds by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |