(self, rational=False)
Efficiently extract the coefficient of a product.
Efficiently extract the coefficient of a product.
Efficiently extract the coefficient of a product .
def as_coeff_Mul(self, rational=False):
        """Efficiently extract the coefficient of a product. """
        coeff, args = self.args[0], self.args[1:]

        if coeff.is_Number and not (rational and not coeff.is_Rational):
            if len(args) == 1:
                return coeff, args[0]
            else:
                return coeff, self._new_rawargs(*args)
        else:
            return S.One, self
def as_coeff_Mul ( self , rational = False ) : coeff , args = self . args [ 0 ] , self . args [ 1 : ] if coeff . is_Number and not ( rational and not coeff . is_Rational ) : if len ( args ) == 1 : return coeff , args [ 0 ] else : return coeff , self . _new_rawargs ( * args ) else : return S . One , self