* Bug 15058 fixed: gcd and lcm result could be puzzingly <0
[scilab.git] / scilab / modules / elementary_functions / help / ru_RU / discrete / lcm.xml
index 3bb931e..c9649ff 100644 (file)
  * along with this program.
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ru" xml:id="lcm">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
+          xml:lang="ru" xml:id="lcm">
     <refnamediv>
         <refname>lcm</refname>
         <refpurpose>наименьшее общее кратное (НОК)</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Синтаксис</title>
-        <synopsis>[pp, fact] = lcm(p)</synopsis>
+        <synopsis>
+           pp = lcm(p)
+          [pp, fact] = lcm(p)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Аргументы</title>
     <refsection>
         <title>Описание</title>
         <para>
-            <code>pp=lcm(p)</code> вычисляет наименьшее общее кратное <varname>pp</varname> вектора полиномиальных значений <varname>p</varname>.
+            <code>pp=lcm(p)</code> вычисляет наименьшее общее кратное <varname>pp</varname> вектора
+            полиномиальных значений <varname>p</varname>.
         </para>
         <para>
-            <code>[pp, fact]=lcm(p)</code> вычисляет дополнительно вектор <varname>fact</varname> такой, что:
+            <code>[pp, fact]=lcm(p)</code> вычисляет дополнительно вектор <varname>fact</varname>
+            такой, что <literal>p .* fact = pp * ones(p)</literal>.
         </para>
         <para>
-            <code>p.*fact=pp*ones(p)</code>.
+          If <literal>p</literal> is a set of integers with some negative ones, the returned value
+          <literal>pp</literal> of their LCM is always positive.
+        </para>
+        <para>
+            If <literal>p</literal> is an array of decimal integers, they are priorly converted
+            into <literal>int32</literal> before processing.
         </para>
     </refsection>
     <refsection>
         <title>Примеры</title>
-        <programlisting role="example"><![CDATA[ 
+        <programlisting role="example"><![CDATA[
 //случай полиномов
 s=poly(0,'s');
 p=[s,s*(s+1)^2,s^2*(s+2)];
@@ -87,4 +100,15 @@ lcm(V)
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>История</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0.1</revnumber>
+                <revdescription>
+                   For input integers possibly negative, the returned LCM is now always positive.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>