* Bug 15058 fixed: gcd and lcm result could be puzzingly <0
[scilab.git] / scilab / modules / elementary_functions / help / ru_RU / discrete / lcm.xml
index ef14b93..c9649ff 100644 (file)
@@ -1,67 +1,83 @@
-        <?xml version="1.0" encoding="UTF-8"?>
-    <!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2006-2008 - INRIA
  *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ *
+ * This file is hereby licensed under the terms of the GNU GPL v2.0,
+ * pursuant to article 5.3.4 of the CeCILL v.2.1.
+ * This file was originally licensed under the terms of the CeCILL v2.1,
+ * and continues to be available under such terms.
+ * For more information, see the COPYING file which you should have received
+ * 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">
-        <refnamediv>
-            <refname>lcm</refname>
-            <refpurpose>наименьшее общее кратное (НОК)</refpurpose>
-        </refnamediv>
-        <refsynopsisdiv>
-            <title>Последовательность вызова</title>
-            <synopsis>[pp, fact] = lcm(p)</synopsis>
-        </refsynopsisdiv>
-        <refsection>
-            <title>Аргументы</title>
-            <variablelist>
-                <varlistentry>
-                    <term>p</term>
-                    <listitem>
-                        <para>
-                            вектор-строка полиномиальных значений <literal>p = [p1, ..., pn]</literal> либо
-                            вектор-строка целочисленных значений (тип 8).
-                        </para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>fact</term>
-                    <listitem>
-                        <para>
-                            вектор полиномиальных или целочисленных значений (тип 8).
-                        </para>
-                    </listitem>
-                </varlistentry>
-                <varlistentry>
-                    <term>pp</term>
-                    <listitem>
-                        <para>полином или целое число.</para>
-                    </listitem>
-                </varlistentry>
-            </variablelist>
-        </refsection>
-        <refsection>
-            <title>Описание</title>
-            <para>
-                <code>pp=lcm(p)</code> вычисляет наименьшее общее кратное <varname>pp</varname> вектора полиномиальных значений <varname>p</varname>.
-            </para>
-            <para>
-                <code>[pp, fact]=lcm(p)</code> вычисляет дополнительно вектор <varname>fact</varname> такой, что:
-            </para>
-            <para>
-                <code>p.*fact=pp*ones(p)</code>.
-            </para>
-        </refsection>
-        <refsection>
-            <title>Примеры</title>
-            <programlisting role="example"><![CDATA[ 
+<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 = lcm(p)
+          [pp, fact] = lcm(p)
+        </synopsis>
+    </refsynopsisdiv>
+    <refsection>
+        <title>Аргументы</title>
+        <variablelist>
+            <varlistentry>
+                <term>p</term>
+                <listitem>
+                    <para>
+                        вектор-строка полиномиальных значений <literal>p = [p1, ..., pn]</literal> либо
+                        вектор-строка целочисленных значений (тип 8).
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>fact</term>
+                <listitem>
+                    <para>
+                        вектор полиномиальных или целочисленных значений (тип 8).
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>pp</term>
+                <listitem>
+                    <para>полином или целое число.</para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection>
+        <title>Описание</title>
+        <para>
+            <code>pp=lcm(p)</code> вычисляет наименьшее общее кратное <varname>pp</varname> вектора
+            полиномиальных значений <varname>p</varname>.
+        </para>
+        <para>
+            <code>[pp, fact]=lcm(p)</code> вычисляет дополнительно вектор <varname>fact</varname>
+            такой, что <literal>p .* fact = pp * ones(p)</literal>.
+        </para>
+        <para>
+          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[
 //случай полиномов
 s=poly(0,'s');
 p=[s,s*(s+1)^2,s^2*(s+2)];
@@ -72,16 +88,27 @@ p.*fact, pp
 V=int32([2^2*3^5, 2^3*3^2,2^2*3^4*5]);
 lcm(V)
  ]]></programlisting>
-        </refsection>
-        <refsection role="see also">
-            <title>Смотрите также</title>
-            <simplelist type="inline">
-                <member>
-                    <link linkend="gcd">gcd</link>
-                </member>
-                <member>
-                    <link linkend="bezout">bezout</link>
-                </member>
-            </simplelist>
-        </refsection>
-    </refentry>
+    </refsection>
+    <refsection role="see also">
+        <title>Смотрите также</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="gcd">gcd</link>
+            </member>
+            <member>
+                <link linkend="bezout">bezout</link>
+            </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>