* Bug 15058 fixed: gcd and lcm result could be puzzingly <0
[scilab.git] / scilab / modules / elementary_functions / help / ru_RU / discrete / lcm.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2006-2008 - INRIA
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17           xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
18           xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
19           xml:lang="ru" xml:id="lcm">
20     <refnamediv>
21         <refname>lcm</refname>
22         <refpurpose>наименьшее общее кратное (НОК)</refpurpose>
23     </refnamediv>
24     <refsynopsisdiv>
25         <title>Синтаксис</title>
26         <synopsis>
27            pp = lcm(p)
28           [pp, fact] = lcm(p)
29         </synopsis>
30     </refsynopsisdiv>
31     <refsection>
32         <title>Аргументы</title>
33         <variablelist>
34             <varlistentry>
35                 <term>p</term>
36                 <listitem>
37                     <para>
38                         вектор-строка полиномиальных значений <literal>p = [p1, ..., pn]</literal> либо
39                         вектор-строка целочисленных значений (тип 8).
40                     </para>
41                 </listitem>
42             </varlistentry>
43             <varlistentry>
44                 <term>fact</term>
45                 <listitem>
46                     <para>
47                         вектор полиномиальных или целочисленных значений (тип 8).
48                     </para>
49                 </listitem>
50             </varlistentry>
51             <varlistentry>
52                 <term>pp</term>
53                 <listitem>
54                     <para>полином или целое число.</para>
55                 </listitem>
56             </varlistentry>
57         </variablelist>
58     </refsection>
59     <refsection>
60         <title>Описание</title>
61         <para>
62             <code>pp=lcm(p)</code> вычисляет наименьшее общее кратное <varname>pp</varname> вектора
63             полиномиальных значений <varname>p</varname>.
64         </para>
65         <para>
66             <code>[pp, fact]=lcm(p)</code> вычисляет дополнительно вектор <varname>fact</varname>
67             такой, что <literal>p .* fact = pp * ones(p)</literal>.
68         </para>
69         <para>
70           If <literal>p</literal> is a set of integers with some negative ones, the returned value
71           <literal>pp</literal> of their LCM is always positive.
72         </para>
73         <para>
74             If <literal>p</literal> is an array of decimal integers, they are priorly converted
75             into <literal>int32</literal> before processing.
76         </para>
77     </refsection>
78     <refsection>
79         <title>Примеры</title>
80         <programlisting role="example"><![CDATA[
81 //случай полиномов
82 s=poly(0,'s');
83 p=[s,s*(s+1)^2,s^2*(s+2)];
84 [pp,fact]=lcm(p);
85 p.*fact, pp
86
87 //случай целых чисел
88 V=int32([2^2*3^5, 2^3*3^2,2^2*3^4*5]);
89 lcm(V)
90  ]]></programlisting>
91     </refsection>
92     <refsection role="see also">
93         <title>Смотрите также</title>
94         <simplelist type="inline">
95             <member>
96                 <link linkend="gcd">gcd</link>
97             </member>
98             <member>
99                 <link linkend="bezout">bezout</link>
100             </member>
101         </simplelist>
102     </refsection>
103     <refsection role="history">
104         <title>История</title>
105         <revhistory>
106             <revision>
107                 <revnumber>6.0.1</revnumber>
108                 <revdescription>
109                    For input integers possibly negative, the returned LCM is now always positive.
110                 </revdescription>
111             </revision>
112         </revhistory>
113     </refsection>
114 </refentry>