Simplify GMP code with _as_parameter_