implement prime test via gmp