(self)
return int(-(man >> 8) if neg else man >> 8)
Return value rounded to Python int.
Return value rounded to Python int.
Return value rounded to Python int .
def to_int(self):
        """Return value rounded to Python int."""
        man, neg = self._to_int_den()
        # carry: round to nearest, halves away from zero
        if man & 0x80:
            man += 0x80
        # note that -man >> 8 and -(man >> 8) are different
        # due to Python's rounding rules
        # python2: int() converts from type long if possible
        return int(-(man >> 8) if neg else man >> 8)
def to_int ( self ) : man , neg = self . _to_int_den ( ) # carry: round to nearest, halves away from zero if man & 0x80 : man += 0x80 # note that -man >> 8 and -(man >> 8) are different # due to Python's rounding rules # python2: int() converts from type long if possible return int ( - ( man >> 8 ) if neg else man >> 8 )