Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
            return ackermann($i-1, ackermann($i,$j-1));
        } 
    }
    
  2. or download this
    $ perl  pseudo_acker.pl 3 4
    Iteration 1: i = 3, j = 4
    Iteration 2: i = 3, j = 3
    ...
    Iteration 38: i = 1, j = inf
    Iteration 39: i = 1, j = inf
    Iteration 40: i = 1, j = inf
    
  3. or download this
    return 2**$j;
    
  4. or download this
    sub acker {
        my ($m, $n) = @_;
    ...
        return acker( $m-1, 1) if $n == 0;
        return acker ($m - 1, acker ($m, $n - 1));
    }