- UNIX-like system (probably includes Cygwin; not tested, though.)
- ≥ gmp-4.0
Additionally, accurate computation timing requires librt; this is used by default and is present on just about any sane system.
Installation follows the usual configure/make/make install procedure.
Given m and n, stackermann simply calculates the value and prints it to stdout:
$ stackermann 4 1 A(4, 1)=65533Use the -t option to suppress the leading A(m, n)=:
$ stackermann -t 4 1 65533If n is not given, n=m is assumed:
$ stackermann 3 A(3, 3)=61The -s option may be used to additionally print computation statistics to stderr:
$ stackermann -s 3 A(3, 3)=61 Processing time: 0.001 s. 8 stack ops; max stack size 4 (~72 bytes).
In benchmark mode (the -b option), stackermann does not print the calculated value at all; instead, it prints statistics on what it took to calculate it. The output produced is printed as a space-separated list of—respectively—total computation time in seconds, total number of stack pushes, maximum number of stack entries, and approximate maximum stack size in bytes.
$ stackermann -b 4 2 0.050 131103 65534 1048552
For an up-to-date overview of all available options and features, see the manpage included in the source tarball.
Limitations, bugs and feedback
To improve efficiency, stackermann does not allow the m-parameter to be greater than 255. In reality, this is unlikely to pose a problem, since no current computer will have the memory or speed required to compute the values with high m-parameters anyway. This is not a bug; do NOT report it as one!
Bugs and feedback
Report bugs through MantisBT at http://bugs.penguindevelopment.org/ (you will need to sign up for an account). If and only if you're unable to use MantisBT, you can report bugs via email at bugs[at]proj[dot]penguindevelopment[dot]org.
Send your feedback to feedback[at]proj[dot]penguindevelopment[dot]org.
Before reporting a bug, make sure it isn't listed on MantisBT!