class_docstr: Represents a field domain. 
class_docstr_tok: ["Represents","a","field","domain","."]
docstr: Returns LCM of ``a`` and ``b``.
  
  >>> from sympy.polys.domains import QQ
  >>> from sympy import S, lcm
  
  >>> QQ.lcm(QQ(2, 3), QQ(4, 9))
  4/3
  >>> lcm(S(2)/3, S(4)/9)
  4/3
docstr_tok: ["Returns","LCM","of","``","a","``","and","``","b","``",".",">",">",">","from","sympy.polys.domains","import","QQ",">",">",">","from","sympy","import","S",",","lcm",">",">",">","QQ.lcm","(","QQ","(","2",",","3",")",",","QQ","(","4",",","9",")",")","4\/3",">",">",">","lcm","(","S","(","2",")","\/3",",","S","(","4",")","\/9",")","4\/3"]
code: def lcm(self, a, b):
      """
      Returns LCM of ``a`` and ``b``.
  
      >>> from sympy.polys.domains import QQ
      >>> from sympy import S, lcm
  
      >>> QQ.lcm(QQ(2, 3), QQ(4, 9))
      4/3
      >>> lcm(S(2)/3, S(4)/9)
      4/3
  
      """
  
      try:
          ring = self.get_ring()
      except DomainError:
          return a * b
  
      p = ring.lcm(self.numer(a), self.numer(b))
      q = ring.gcd(self.denom(a), self.denom(b))
  
      return self.convert(p, ring) / q
  
file_path: sympy/sympy/polys/domains/field.py
imports: from sympy.polys.domains.ring import Ring
  from sympy.polys.polyerrors import NotReversible, DomainError
  from sympy.utilities import public
label_desc: Use image node_id 8 for calling the Field obj's underlying member method code with example usage: obj.lcm(a, b) and returns: unknown, unknown