(self, right_in)
return self
Multiply in-place.
Multiply in-place.
Multiply in - place .
def imul(self, right_in):
        """Multiply in-place."""
        if self.is_zero() or right_in.is_zero():
            # set any zeroes to standard zero
            self._buffer[:] = b'\0' * self.size
            return self
        lexp, lman, lneg = self._denormalise()
        rexp, rman, rneg = right_in._denormalise()
        lexp += rexp - right_in._bias - 8
        lneg = (lneg != rneg)
        lman *= rman
        if lexp < -31:
            self._buffer[:] = b'\0' * self.size
            return self
        # drop some precision
        lman, lexp = self._bring_to_range(lman, lexp, self._den_mask>>4, self._den_upper>>4)
        # rounding quirk
        if lman & 0xf == 0x9:
            lman &= (self._carrymask + 0xfe)
        self._normalise(lexp, lman, lneg)
        return self
def imul ( self , right_in ) : if self . is_zero ( ) or right_in . is_zero ( ) : # set any zeroes to standard zero self . _buffer [ : ] = b'\0' * self . size return self lexp , lman , lneg = self . _denormalise ( ) rexp , rman , rneg = right_in . _denormalise ( ) lexp += rexp - right_in . _bias - 8 lneg = ( lneg != rneg ) lman *= rman if lexp < - 31 : self . _buffer [ : ] = b'\0' * self . size return self # drop some precision lman , lexp = self . _bring_to_range ( lman , lexp , self . _den_mask >> 4 , self . _den_upper >> 4 ) # rounding quirk if lman & 0xf == 0x9 : lman &= ( self . _carrymask + 0xfe ) self . _normalise ( lexp , lman , lneg ) return self