<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>lcm</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="lcm"> least common multiple</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>[pp,fact]=lcm(p)  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>p</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>:</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>fact</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: polynomial vector or integer vector (type equal to 8)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>pp</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: polynomial or integer</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>pp=lcm(p)</VERB> computes the lcm <VERB>pp</VERB> of polynomial vector <VERB>p</VERB>.</P>
    <P><VERB>[pp,fact]=lcm(p)</VERB> computes in addition the vector <VERB>fact</VERB> such that:</P>
    <P>
      <VERB>p.*fact=pp*ones(p)</VERB>
    </P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
//polynomial case
s=poly(0,'s');
p=[s,s*(s+1)^2,s^2*(s+2)];
[pp,fact]=lcm(p);
p.*fact, pp
//integer case
V=int32([2^2*3^5, 2^3*3^2,2^2*3^4*5]);
lcm(V)

 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>gcd</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>bezout</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
