Uses gmp and Rmpfr for large solutions. Default D is for Archimedes cattle problem.