@public
def lcm(f, g=None, *gens, **args):
 if hasattr(f, '__iter__'):
  if (g is not None):
   gens = ((g,) + gens)
  return lcm_list(f, *gens, **args)
 elif (g is None):
  raise TypeError('lcm() takes 2 arguments or a sequence of arguments')
 options.allowed_flags(args, ['polys'])
 try:
  ((F, G), opt) = parallel_poly_from_expr((f, g), *gens, **args)
 except PolificationFailed as exc:
  (domain, (a, b)) = construct_domain(exc.exprs)
  try:
   return domain.to_sympy(domain.lcm(a, b))
  except NotImplementedError:
   raise ComputationFailed('lcm', 2, exc)
 result = F.lcm(G)
 if (not opt.polys):
  return result.as_expr()
 else:
  return result

@ public def lcm ( f , g = None , * gens , ** args ) : if hasattr ( f , '__iter__' ) : if ( g is not None ) : gens = ( ( g , ) + gens ) return lcm_list ( f , * gens , ** args ) elif ( g is None ) : raise TypeError ( 'lcm() takes 2 arguments or a sequence of arguments' ) options . allowed_flags ( args , [ 'polys' ] ) try : ( ( F , G ) , opt ) = parallel_poly_from_expr ( ( f , g ) , * gens , ** args ) except PolificationFailed as exc : ( domain , ( a , b ) ) = construct_domain ( exc . exprs ) try : return domain . to_sympy ( domain . lcm ( a , b ) ) except NotImplementedError : raise ComputationFailed ( 'lcm' , 2 , exc ) result = F . lcm ( G ) if ( not opt . polys ) : return result . as_expr ( ) else : return result
simple version of lcm .