Example implementation using gmp.