'Rounds to the nearest integer, without raising inexact, rounded.'

def to_integral(self, rounding=None, context=None):

    if self._is_special:
        ans = self._check_nans(context=context)
        if ans:
            return ans
    if (self._exp >= 0):
        return self
    if (context is None):
        context = getcontext()
    flags = context._ignore_flags(Rounded, Inexact)
    ans = self._rescale(0, rounding, context=context)
    context._regard_flags(flags)
    return ans
