very little performance improvement by using gmp_powm when exponnent is >= 3