class_docstr: Efficient representation of ``f_1*f_2*...*f_n``.
class_docstr_tok: ["Efficient","representation","of","``","f_1","*","f_2","*","...","*","f_n","``","."]
docstr: Return ``self`` and ``other`` with ``gcd`` removed from each.
  The only differences between this and method ``div`` is that this
  is 1) optimized for the case when there are few factors in common and
  2) this does not raise an error if ``other`` is zero.
  
  See Also
  ========
  div
docstr_tok: ["Return","``","self","``","and","``","other","``","with","``","gcd","``","removed","from","each",".","The","only","differences","between","this","and","method","``","div","``","is","that","this","is","1",")","optimized","for","the","case","when","there","are","few","factors","in","common","and","2",")","this","does","not","raise","an","error","if","``","other","``","is","zero",".","See","Also","========","div"]
code: def normal(self, other):
      """Return ``self`` and ``other`` with ``gcd`` removed from each.
      The only differences between this and method ``div`` is that this
      is 1) optimized for the case when there are few factors in common and
      2) this does not raise an error if ``other`` is zero.
  
      See Also
      ========
      div
  
      """
      if not isinstance(other, Factors):
          other = Factors(other)
          if other.is_zero:
              return (Factors(), Factors(S.Zero))
          if self.is_zero:
              return (Factors(S.Zero), Factors())
  
      self_factors = dict(self.factors)
      other_factors = dict(other.factors)
  
      for factor, self_exp in self.factors.items():
          try:
              other_exp = other.factors[factor]
          except KeyError:
              continue
  
          exp = self_exp - other_exp
  
          if not exp:
              del self_factors[factor]
              del other_factors[factor]
          elif _isnumber(exp):
              if exp > 0:
                  self_factors[factor] = exp
                  del other_factors[factor]
              else:
                  del self_factors[factor]
                  other_factors[factor] = -exp
          else:
              r = self_exp.extract_additively(other_exp)
              if r is not None:
                  if r:
                      self_factors[factor] = r
                      del other_factors[factor]
                  else:  # should be handled already
                      del self_factors[factor]
                      del other_factors[factor]
              else:
                  sc, sa = self_exp.as_coeff_Add()
                  if sc:
                      oc, oa = other_exp.as_coeff_Add()
                      diff = sc - oc
                      if diff > 0:
                          self_factors[factor] -= oc
                          other_exp = oa
                      elif diff < 0:
                          self_factors[factor] -= sc
                          other_factors[factor] -= sc
                          other_exp = oa - diff
                      else:
                          self_factors[factor] = sa
                          other_exp = oa
                  if other_exp:
                      other_factors[factor] = other_exp
                  else:
                      del other_factors[factor]
  
      return Factors(self_factors), Factors(other_factors)
  
imports: from .add import Add
  from .mul import Mul, _keep_coeff
  from .power import Pow
  from .basic import Basic
  from .expr import Expr
  from .function import expand_power_exp
  from .sympify import sympify
  from .numbers import Rational, Integer, Number, I, equal_valued
  from .singleton import S
  from .sorting import default_sort_key, ordered
  from .symbol import Dummy
  from .traversal import preorder_traversal
  from .coreerrors import NonCommutativeExpression
  from .containers import Tuple, Dict
  from sympy.external.gmpy import SYMPY_INTS
  from sympy.utilities.iterables import common_prefix, common_suffix, variations, iterable, is_sequence
  from collections import defaultdict
  from typing import Tuple
label_desc: Use image node_id 8 for calling the Factors obj's underlying member method code with example usage: obj.normal(other) and returns: Factors,  Factors, Factors,  Factors, Factors,  Factors