static PyObject *
GMPy_MPZ_Function_Iroot(PyObject *self, PyObject *args)
{
unsigned long n;
int exact;
MPZ_Object *root = NULL, *tempx = NULL;
PyObject *result = NULL;
if ((PyTuple_GET_SIZE(args) != 2) ||
((!IS_INTEGER(PyTuple_GET_ITEM(args, 0))) ||
(!IS_INTEGER(PyTuple_GET_ITEM(args, 1))))) {
TYPE_ERROR("iroot() requires 'int','int' arguments");
return NULL;
}
n = c_ulong_From_Integer(PyTuple_GET_ITEM(args, 1));
if ((n == 0) || ((n == (unsigned long)(-1)) && PyErr_Occurred())) {