#NEWLINE# def _print_Mul( self , expr ) : #NEWLINE# #INDENT# prec = precedence ( expr ) #NEWLINE# ( c , e ) = expr . as_coeff_Mul ( ) #NEWLINE# if ( c < 0 ) : #NEWLINE# #INDENT# expr = _keep_coeff ( ( - c ) , e ) #NEWLINE# sign = '-' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sign = '' #NEWLINE# #UNINDENT# a = [ ] #NEWLINE# b = [ ] #NEWLINE# if ( self . order not in ( 'old' , 'none' ) ) : #NEWLINE# #INDENT# args = expr . as_ordered_factors ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# args = Mul . make_args ( expr ) #NEWLINE# #UNINDENT# for item in args : #NEWLINE# #INDENT# if ( item . is_commutative and item . is_Pow and item . exp . is_Rational and sign . exp . is_negative ) : #NEWLINE# #INDENT# if ( item . exp != ( - 1 ) ) : #NEWLINE# #INDENT# b . append ( Pow ( item . base , ( - item . exp ) , evaluate = False ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# b . append ( Pow ( item . base , ( - item . exp ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( item . is_Rational and ( item is not S . Infinity ) ) : #NEWLINE# #INDENT# if ( item . p != 1 ) : #NEWLINE# #INDENT# a . append ( Rational ( item . p ) ) #NEWLINE# #UNINDENT# if ( item . q != 1 ) : #NEWLINE# #INDENT# b . append ( Rational ( item . q ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# a . append ( item ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# a = ( a or [ S . One ] ) #NEWLINE# a_str = [ self . parenthesize ( x , prec , strict = False ) for x in a ] #NEWLINE# b_str = [ self . parenthesize ( x , prec , strict = False ) for x in b ] #NEWLINE# if ( len ( b ) == 0 ) : #NEWLINE# #INDENT# return ( sign + '*' . join ( a_str ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( b ) == 1 ) : #NEWLINE# #INDENT# return ( ( ( sign + '*' . join ( a_str ) ) + '/' ) + b_str [ 0 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( ( sign + '*' . join ( a_str ) ) + ( '/(%s)' % '*' . join ( b_str ) ) )