Exercises 13.1 and 13.2 with GMP support, plus improved Makefile.