(ctx, x, gaussian=False)
Return *True* if *x* is integer-valued; otherwise return
        *False*::

            >>> from sympy.mpmath import *
            >>> isint(3)
            True
            >>> isint(mpf(3))
            True
            >>> isint(3.2)
            False
            >>> isint(inf)
            False

        Optionally, Gaussian integers can be checked for::

            >>> isint(3+0j)
            True
            >>> isint(3+2j)
            False
            >>> isint(3+2j, gaussian=True)
            True
Return *True* if *x* is integer-valued; otherwise return
        *False*::
Return * True * if * x * is integer - valued ; otherwise return * False * ::
def isint(ctx, x, gaussian=False):
        """
        Return *True* if *x* is integer-valued; otherwise return
        *False*::

            >>> from sympy.mpmath import *
            >>> isint(3)
            True
            >>> isint(mpf(3))
            True
            >>> isint(3.2)
            False
            >>> isint(inf)
            False

        Optionally, Gaussian integers can be checked for::

            >>> isint(3+0j)
            True
            >>> isint(3+2j)
            False
            >>> isint(3+2j, gaussian=True)
            True

        """
        if isinstance(x, int_types):
            return True
        if hasattr(x, "_mpf_"):
            sign, man, exp, bc = xval = x._mpf_
            return bool((man and exp >= 0) or xval == fzero)
        if hasattr(x, "_mpc_"):
            re, im = x._mpc_
            rsign, rman, rexp, rbc = re
            isign, iman, iexp, ibc = im
            re_isint = (rman and rexp >= 0) or re == fzero
            if gaussian:
                im_isint = (iman and iexp >= 0) or im == fzero
                return re_isint and im_isint
            return re_isint and im == fzero
        if isinstance(x, rational.mpq):
            p, q = x._mpq_
            return p % q == 0
        x = ctx.convert(x)
        if hasattr(x, '_mpf_') or hasattr(x, '_mpc_'):
            return ctx.isint(x, gaussian)
        raise TypeError("isint() needs a number as input")
def isint ( ctx , x , gaussian = False ) : if isinstance ( x , int_types ) : return True if hasattr ( x , "_mpf_" ) : sign , man , exp , bc = xval = x . _mpf_ return bool ( ( man and exp >= 0 ) or xval == fzero ) if hasattr ( x , "_mpc_" ) : re , im = x . _mpc_ rsign , rman , rexp , rbc = re isign , iman , iexp , ibc = im re_isint = ( rman and rexp >= 0 ) or re == fzero if gaussian : im_isint = ( iman and iexp >= 0 ) or im == fzero return re_isint and im_isint return re_isint and im == fzero if isinstance ( x , rational . mpq ) : p , q = x . _mpq_ return p % q == 0 x = ctx . convert ( x ) if hasattr ( x , '_mpf_' ) or hasattr ( x , '_mpc_' ) : return ctx . isint ( x , gaussian ) raise TypeError ( "isint() needs a number as input" )