exercise 1.10 trying to implement Ackermann's function with arbitrary precision